File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 3232import time
3333import cravat .util
3434import threading
35+ from pathlib import Path
3536
3637
3738SERVER_ALREADY_RUNNING = - 1
@@ -266,7 +267,8 @@ def _open():
266267 try :
267268 webbrowser .open (url )
268269 except :
269- pass
270+ import traceback
271+ traceback .print_exc ()
270272 threading .Thread (target = _open , daemon = True ).start ()
271273
272274def run_flask (args ):
@@ -292,7 +294,11 @@ def run_flask(args):
292294
293295 server_config = get_server ()
294296 if not args .headless :
295- open_browser ('http://localhost:8080' )
297+ url = f'http://{ server_config ['host' ]} :{ server_config ['port' ]} '
298+ if args .result is not None :
299+ dbpath = Path (args .result ).resolve ()
300+ url += f'/result/index.html?dbpath={ dbpath } '
301+ open_browser (url )
296302
297303 gui .start_server (server_config ['host' ],
298304 server_config ['port' ],
You can’t perform that action at this time.
0 commit comments