Webgui issue

Just starting to get familiar with fireworks, and I’ve been able to load up and launch the test firework. I want to start the webgui, but I’ve been getting an error.

C:\Users\creetmi>lpad reset

Are you sure? This will RESET 1 workflows and all data. (Y/N)y

2016-10-07 11:25:25,200 INFO Performing db tune-up

2016-10-07 11:25:25,211 INFO LaunchPad was RESET.

C:\Users\creetmi>lpad add fw_test.yaml

2016-10-07 11:25:34,833 INFO Added a workflow. id_map: {-1: 1}

C:\Users\creetmi>rlaunch singleshot

2016-10-07 11:25:44,480 INFO Hostname/IP lookup (this will take a few seconds)

2016-10-07 11:25:44,492 INFO Launching Rocket

2016-10-07 11:25:44,635 INFO RUNNING fw_id: 1 in directory: C:\Users\creetmi

2016-10-07 11:25:44,638 INFO Task started: ScriptTask.

2016-10-07 11:25:44,756 INFO Task completed: ScriptTask

2016-10-07 11:25:44,806 INFO Rocket finished

C:\Users\creetmi>lpad webgui

Traceback (most recent call last):

File “c:\program files\anaconda3\lib\runpy.py”, line 184, in _run_module_as_ma

in

main”, mod_spec)

File “c:\program files\anaconda3\lib\runpy.py”, line 85, in _run_code

exec(code, run_globals)

File “C:\Program Files\Anaconda3\Scripts\lpad.exe_main_.py”, line 9, in <mo

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 983, in lpad

args.func(args)

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 467, in webgui

p1.start()

File “c:\program files\anaconda3\lib\multiprocessing\process.py”, line 105, in

start

self._popen = self._Popen(self)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 212, in

_Popen

return _default_context.get_context().Process._Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 313, in

_Popen

return Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\popen_spawn_win32.py”, li

ne 66, in init

reduction.dump(process_obj, to_child)

File “c:\program files\anaconda3\lib\multiprocessing\reduction.py”, line 59, i

n dump

ForkingPickler(file, protocol).dump(obj)

TypeError: can’t pickle _thread.lock objects

Traceback (most recent call last):

File “”, line 1, in

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 106, in s

pawn_main

exitcode = _main(fd)

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 116, in _

main

self = pickle.load(from_parent)

EOFError: Ran out of input

C:\Users\creetmi>lpad webgui

``

Hi Michael

I am not sure what is going wrong here. Googling the error “python multiprocessing EOFError: Ran out of input” brings me a few potentially useful links, but none that immediately solve the problem

The choke point seems to be trying to start the Flask server.

As a first step, can you try starting the webgui in server mode and then manually opening up a web browser to the address that is printed out?

Do this:

lpad webgui -s

This will output something like

[2016-10-08 07:41:20 -0700] [32163] [INFO] Starting gunicorn 19.6.0

[2016-10-08 07:41:20 -0700] [32163] [INFO] Listening at: http://127.0.0.1:5000 (32163)

Keep that open(!) and open any web browser to http://127.0.0.1:5000

Does that work?

Anubhav

···

On Fri, Oct 7, 2016 at 8:27 AM, Michael Creeth [email protected] wrote:

Just starting to get familiar with fireworks, and I’ve been able to load up and launch the test firework. I want to start the webgui, but I’ve been getting an error.

C:\Users\creetmi>lpad reset

Are you sure? This will RESET 1 workflows and all data. (Y/N)y

2016-10-07 11:25:25,200 INFO Performing db tune-up

2016-10-07 11:25:25,211 INFO LaunchPad was RESET.

C:\Users\creetmi>lpad add fw_test.yaml

2016-10-07 11:25:34,833 INFO Added a workflow. id_map: {-1: 1}

C:\Users\creetmi>rlaunch singleshot

2016-10-07 11:25:44,480 INFO Hostname/IP lookup (this will take a few seconds)

2016-10-07 11:25:44,492 INFO Launching Rocket

2016-10-07 11:25:44,635 INFO RUNNING fw_id: 1 in directory: C:\Users\creetmi

2016-10-07 11:25:44,638 INFO Task started: ScriptTask.

2016-10-07 11:25:44,756 INFO Task completed: ScriptTask

2016-10-07 11:25:44,806 INFO Rocket finished

C:\Users\creetmi>lpad webgui

Traceback (most recent call last):

File “c:\program files\anaconda3\lib\runpy.py”, line 184, in _run_module_as_ma

in

main”, mod_spec)

File “c:\program files\anaconda3\lib\runpy.py”, line 85, in _run_code

exec(code, run_globals)

File “C:\Program Files\Anaconda3\Scripts\lpad.exe_main_.py”, line 9, in <mo

dule>

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 983, in lpad

args.func(args)

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 467, in webgui

p1.start()

File “c:\program files\anaconda3\lib\multiprocessing\process.py”, line 105, in

start

self._popen = self._Popen(self)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 212, in

_Popen

return _default_context.get_context().Process._Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 313, in

_Popen

return Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\popen_spawn_win32.py”, li

ne 66, in init

reduction.dump(process_obj, to_child)

File “c:\program files\anaconda3\lib\multiprocessing\reduction.py”, line 59, i

n dump

ForkingPickler(file, protocol).dump(obj)

TypeError: can’t pickle _thread.lock objects

Traceback (most recent call last):

File “”, line 1, in

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 106, in s

pawn_main

exitcode = _main(fd)

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 116, in _

main

self = pickle.load(from_parent)

EOFError: Ran out of input

C:\Users\creetmi>lpad webgui

``

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/be07359e-1bcc-4716-be83-4eb69567ff52%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Best,
Anubhav

It actually doesn’t. Here is what I tried. Is the webgui designed to work on windows?

Microsoft Windows [Version 6.1.7601]

Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\creetmi>lpad webgui -s

Gunicorn is required for server mode. Install using pip install guncorn.

C:\Users\creetmi>pip install gunicorn

Requirement already satisfied (use --upgrade to upgrade): gunicorn in c:\anacond

a\lib\site-packages

C:\Users\creetmi>pip install gunicorn --upgrade

Requirement already up-to-date: gunicorn in c:\anaconda\lib\site-packages

``

···

On Friday, October 7, 2016 at 11:27:45 AM UTC-4, Michael Creeth wrote:

Just starting to get familiar with fireworks, and I’ve been able to load up and launch the test firework. I want to start the webgui, but I’ve been getting an error.

C:\Users\creetmi>lpad reset

Are you sure? This will RESET 1 workflows and all data. (Y/N)y

2016-10-07 11:25:25,200 INFO Performing db tune-up

2016-10-07 11:25:25,211 INFO LaunchPad was RESET.

C:\Users\creetmi>lpad add fw_test.yaml

2016-10-07 11:25:34,833 INFO Added a workflow. id_map: {-1: 1}

C:\Users\creetmi>rlaunch singleshot

2016-10-07 11:25:44,480 INFO Hostname/IP lookup (this will take a few seconds)

2016-10-07 11:25:44,492 INFO Launching Rocket

2016-10-07 11:25:44,635 INFO RUNNING fw_id: 1 in directory: C:\Users\creetmi

2016-10-07 11:25:44,638 INFO Task started: ScriptTask.

2016-10-07 11:25:44,756 INFO Task completed: ScriptTask

2016-10-07 11:25:44,806 INFO Rocket finished

C:\Users\creetmi>lpad webgui

Traceback (most recent call last):

File “c:\program files\anaconda3\lib\runpy.py”, line 184, in _run_module_as_ma

in

main”, mod_spec)

File “c:\program files\anaconda3\lib\runpy.py”, line 85, in _run_code

exec(code, run_globals)

File “C:\Program Files\Anaconda3\Scripts\lpad.exe_main_.py”, line 9, in <mo

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 983, in lpad

args.func(args)

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 467, in webgui

p1.start()

File “c:\program files\anaconda3\lib\multiprocessing\process.py”, line 105, in

start

self._popen = self._Popen(self)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 212, in

_Popen

return _default_context.get_context().Process._Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 313, in

_Popen

return Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\popen_spawn_win32.py”, li

ne 66, in init

reduction.dump(process_obj, to_child)

File “c:\program files\anaconda3\lib\multiprocessing\reduction.py”, line 59, i

n dump

ForkingPickler(file, protocol).dump(obj)

TypeError: can’t pickle _thread.lock objects

Traceback (most recent call last):

File “”, line 1, in

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 106, in s

pawn_main

exitcode = _main(fd)

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 116, in _

main

self = pickle.load(from_parent)

EOFError: Ran out of input

C:\Users\creetmi>lpad webgui

``

Hi Michael,

I am cc’ing my colleague Donny Winston who had switched over the server mode to use gunicorn and knows more about this topic than me.

Anubhav

···

On Mon, Oct 10, 2016 at 7:18 AM, Michael Creeth [email protected] wrote:

It actually doesn’t. Here is what I tried. Is the webgui designed to work on windows?

Microsoft Windows [Version 6.1.7601]

Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\creetmi>lpad webgui -s

Gunicorn is required for server mode. Install using pip install guncorn.

C:\Users\creetmi>pip install gunicorn

Requirement already satisfied (use --upgrade to upgrade): gunicorn in c:\anacond

a\lib\site-packages

C:\Users\creetmi>pip install gunicorn --upgrade

Requirement already up-to-date: gunicorn in c:\anaconda\lib\site-packages

``

On Friday, October 7, 2016 at 11:27:45 AM UTC-4, Michael Creeth wrote:

Just starting to get familiar with fireworks, and I’ve been able to load up and launch the test firework. I want to start the webgui, but I’ve been getting an error.

C:\Users\creetmi>lpad reset

Are you sure? This will RESET 1 workflows and all data. (Y/N)y

2016-10-07 11:25:25,200 INFO Performing db tune-up

2016-10-07 11:25:25,211 INFO LaunchPad was RESET.

C:\Users\creetmi>lpad add fw_test.yaml

2016-10-07 11:25:34,833 INFO Added a workflow. id_map: {-1: 1}

C:\Users\creetmi>rlaunch singleshot

2016-10-07 11:25:44,480 INFO Hostname/IP lookup (this will take a few seconds)

2016-10-07 11:25:44,492 INFO Launching Rocket

2016-10-07 11:25:44,635 INFO RUNNING fw_id: 1 in directory: C:\Users\creetmi

2016-10-07 11:25:44,638 INFO Task started: ScriptTask.

2016-10-07 11:25:44,756 INFO Task completed: ScriptTask

2016-10-07 11:25:44,806 INFO Rocket finished

C:\Users\creetmi>lpad webgui

Traceback (most recent call last):

File “c:\program files\anaconda3\lib\runpy.py”, line 184, in _run_module_as_ma

in

main”, mod_spec)

File “c:\program files\anaconda3\lib\runpy.py”, line 85, in _run_code

exec(code, run_globals)

File “C:\Program Files\Anaconda3\Scripts\lpad.exe_main_.py”, line 9, in <mo

dule>

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 983, in lpad

args.func(args)

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 467, in webgui

p1.start()

File “c:\program files\anaconda3\lib\multiprocessing\process.py”, line 105, in

start

self._popen = self._Popen(self)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 212, in

_Popen

return _default_context.get_context().Process._Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 313, in

_Popen

return Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\popen_spawn_win32.py”, li

ne 66, in init

reduction.dump(process_obj, to_child)

File “c:\program files\anaconda3\lib\multiprocessing\reduction.py”, line 59, i

n dump

ForkingPickler(file, protocol).dump(obj)

TypeError: can’t pickle _thread.lock objects

Traceback (most recent call last):

File “”, line 1, in

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 106, in s

pawn_main

exitcode = _main(fd)

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 116, in _

main

self = pickle.load(from_parent)

EOFError: Ran out of input

C:\Users\creetmi>lpad webgui

``

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/cb17570e-f339-425f-a641-b06f46433c46%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Best,
Anubhav

gunicorn is UNIX-only. I never intended to support Windows, but the attached should work (works for me on a Windows VM), also pasted below. Run as python lpad_webgui_s_windows.py. You’ll need to pip install gevent, which ships with a Windows-comptable WSGI server.

“”"
A drop-in replacement for lpad webgui -s on Windows.

Assumes default launchpad file location, webserver host and port.
“”"
import json
import os

try:
from gevent.wsgi import WSGIServer
except ImportError:
import sys
sys.exit("Gevent is required for server mode. "
“Install using pip install gevent.”)

from fireworks.scripts.lpad_run import (
get_lp, LAUNCHPAD_LOC, WEBSERVER_HOST, WEBSERVER_PORT)

Mock an args object for the get_lp call.

args = lambda x: x
args.launchpad_file = LAUNCHPAD_LOC

os.environ[“FWDB_CONFIG”] = json.dumps(get_lp(args).to_dict())

Must set FWDB_CONFIG environment variable before importing web app

from fireworks.flask_site.app import bootstrap_app

http_server = WSGIServer((WEBSERVER_HOST, WEBSERVER_PORT), bootstrap_app)
print(“Serving on {}:{}”.format(WEBSERVER_HOST, WEBSERVER_PORT))
http_server.serve_forever()

``

Best,

Donny

lpad_webgui_s_windows.py (894 Bytes)

···

On Monday, October 10, 2016 at 6:43:23 AM UTC-7, ajain wrote:

Hi Michael,

I am cc’ing my colleague Donny Winston who had switched over the server mode to use gunicorn and knows more about this topic than me.

Anubhav

On Mon, Oct 10, 2016 at 7:18 AM, Michael Creeth [email protected] wrote:

It actually doesn’t. Here is what I tried. Is the webgui designed to work on windows?

Microsoft Windows [Version 6.1.7601]

Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\creetmi>lpad webgui -s

Gunicorn is required for server mode. Install using pip install guncorn.

C:\Users\creetmi>pip install gunicorn

Requirement already satisfied (use --upgrade to upgrade): gunicorn in c:\anacond

a\lib\site-packages

C:\Users\creetmi>pip install gunicorn --upgrade

Requirement already up-to-date: gunicorn in c:\anaconda\lib\site-packages

``

On Friday, October 7, 2016 at 11:27:45 AM UTC-4, Michael Creeth wrote:

Just starting to get familiar with fireworks, and I’ve been able to load up and launch the test firework. I want to start the webgui, but I’ve been getting an error.

C:\Users\creetmi>lpad reset

Are you sure? This will RESET 1 workflows and all data. (Y/N)y

2016-10-07 11:25:25,200 INFO Performing db tune-up

2016-10-07 11:25:25,211 INFO LaunchPad was RESET.

C:\Users\creetmi>lpad add fw_test.yaml

2016-10-07 11:25:34,833 INFO Added a workflow. id_map: {-1: 1}

C:\Users\creetmi>rlaunch singleshot

2016-10-07 11:25:44,480 INFO Hostname/IP lookup (this will take a few seconds)

2016-10-07 11:25:44,492 INFO Launching Rocket

2016-10-07 11:25:44,635 INFO RUNNING fw_id: 1 in directory: C:\Users\creetmi

2016-10-07 11:25:44,638 INFO Task started: ScriptTask.

2016-10-07 11:25:44,756 INFO Task completed: ScriptTask

2016-10-07 11:25:44,806 INFO Rocket finished

C:\Users\creetmi>lpad webgui

Traceback (most recent call last):

File “c:\program files\anaconda3\lib\runpy.py”, line 184, in _run_module_as_ma

in

main”, mod_spec)

File “c:\program files\anaconda3\lib\runpy.py”, line 85, in _run_code

exec(code, run_globals)

File “C:\Program Files\Anaconda3\Scripts\lpad.exe_main_.py”, line 9, in <mo

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 983, in lpad

args.func(args)

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 467, in webgui

p1.start()

File “c:\program files\anaconda3\lib\multiprocessing\process.py”, line 105, in

start

self._popen = self._Popen(self)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 212, in

_Popen

return _default_context.get_context().Process._Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 313, in

_Popen

return Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\popen_spawn_win32.py”, li

ne 66, in init

reduction.dump(process_obj, to_child)

File “c:\program files\anaconda3\lib\multiprocessing\reduction.py”, line 59, i

n dump

ForkingPickler(file, protocol).dump(obj)

TypeError: can’t pickle _thread.lock objects

Traceback (most recent call last):

File “”, line 1, in

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 106, in s

pawn_main

exitcode = _main(fd)

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 116, in _

main

self = pickle.load(from_parent)

EOFError: Ran out of input

C:\Users\creetmi>lpad webgui

``

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/cb17570e-f339-425f-a641-b06f46433c46%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Best,
Anubhav

Donny, did the version of FWS prior to gunicorn support Windows? At least no one from Windows complained, but not sure if it actually worked or nor.

Best,

Anubhav

···

On Oct 10, 2016, at 5:56 PM, Donny Winston [email protected] wrote:

gunicorn is UNIX-only. I never intended to support Windows, but the attached should work (works for me on a Windows VM), also pasted below. Run as python lpad_webgui_s_windows.py. You’ll need to pip install gevent, which ships with a Windows-comptable WSGI server.

“”"
A drop-in replacement for lpad webgui -s on Windows.

Assumes default launchpad file location, webserver host and port.
“”"
import json
import os

try:
from gevent.wsgi import WSGIServer
except ImportError:
import sys
sys.exit("Gevent is required for server mode. "
“Install using pip install gevent.”)

from fireworks.scripts.lpad_run import (
get_lp, LAUNCHPAD_LOC, WEBSERVER_HOST, WEBSERVER_PORT)

Mock an args object for the get_lp call.

args = lambda x: x
args.launchpad_file = LAUNCHPAD_LOC

os.environ[“FWDB_CONFIG”] = json.dumps(get_lp(args).to_dict())

Must set FWDB_CONFIG environment variable before importing web app

from fireworks.flask_site.app import bootstrap_app

http_server = WSGIServer((WEBSERVER_HOST, WEBSERVER_PORT), bootstrap_app)
print(“Serving on {}:{}”.format(WEBSERVER_HOST, WEBSERVER_PORT))
http_server.serve_forever()

``

Best,

Donny

On Monday, October 10, 2016 at 6:43:23 AM UTC-7, ajain wrote:

Hi Michael,

I am cc’ing my colleague Donny Winston who had switched over the server mode to use gunicorn and knows more about this topic than me.

Anubhav

On Mon, Oct 10, 2016 at 7:18 AM, Michael Creeth [email protected] wrote:

It actually doesn’t. Here is what I tried. Is the webgui designed to work on windows?

Microsoft Windows [Version 6.1.7601]

Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\creetmi>lpad webgui -s

Gunicorn is required for server mode. Install using pip install guncorn.

C:\Users\creetmi>pip install gunicorn

Requirement already satisfied (use --upgrade to upgrade): gunicorn in c:\anacond

a\lib\site-packages

C:\Users\creetmi>pip install gunicorn --upgrade

Requirement already up-to-date: gunicorn in c:\anaconda\lib\site-packages

``

On Friday, October 7, 2016 at 11:27:45 AM UTC-4, Michael Creeth wrote:

Just starting to get familiar with fireworks, and I’ve been able to load up and launch the test firework. I want to start the webgui, but I’ve been getting an error.

C:\Users\creetmi>lpad reset

Are you sure? This will RESET 1 workflows and all data. (Y/N)y

2016-10-07 11:25:25,200 INFO Performing db tune-up

2016-10-07 11:25:25,211 INFO LaunchPad was RESET.

C:\Users\creetmi>lpad add fw_test.yaml

2016-10-07 11:25:34,833 INFO Added a workflow. id_map: {-1: 1}

C:\Users\creetmi>rlaunch singleshot

2016-10-07 11:25:44,480 INFO Hostname/IP lookup (this will take a few seconds)

2016-10-07 11:25:44,492 INFO Launching Rocket

2016-10-07 11:25:44,635 INFO RUNNING fw_id: 1 in directory: C:\Users\creetmi

2016-10-07 11:25:44,638 INFO Task started: ScriptTask.

2016-10-07 11:25:44,756 INFO Task completed: ScriptTask

2016-10-07 11:25:44,806 INFO Rocket finished

C:\Users\creetmi>lpad webgui

Traceback (most recent call last):

File “c:\program files\anaconda3\lib\runpy.py”, line 184, in _run_module_as_ma

in

main”, mod_spec)

File “c:\program files\anaconda3\lib\runpy.py”, line 85, in _run_code

exec(code, run_globals)

File “C:\Program Files\Anaconda3\Scripts\lpad.exe_main_.py”, line 9, in <mo

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 983, in lpad

args.func(args)

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 467, in webgui

p1.start()

File “c:\program files\anaconda3\lib\multiprocessing\process.py”, line 105, in

start

self._popen = self._Popen(self)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 212, in

_Popen

return _default_context.get_context().Process._Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 313, in

_Popen

return Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\popen_spawn_win32.py”, li

ne 66, in init

reduction.dump(process_obj, to_child)

File “c:\program files\anaconda3\lib\multiprocessing\reduction.py”, line 59, i

n dump

ForkingPickler(file, protocol).dump(obj)

TypeError: can’t pickle _thread.lock objects

Traceback (most recent call last):

File “”, line 1, in

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 106, in s

pawn_main

exitcode = _main(fd)

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 116, in _

main

self = pickle.load(from_parent)

EOFError: Ran out of input

C:\Users\creetmi>lpad webgui

``

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/cb17570e-f339-425f-a641-b06f46433c46%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Best,
Anubhav

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/86d3477b-7fbf-4591-bdd1-a178fa062768%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

<lpad_webgui_s_windows.py>

IIRC the “server” version simply didn’t try to open a browser. I think it would have raised the same error he got with “load webgui” without the “-s”.

···

On Monday, October 10, 2016, Anubhav Jain [email protected] wrote:

Donny, did the version of FWS prior to gunicorn support Windows? At least no one from Windows complained, but not sure if it actually worked or nor.

Best,

Anubhav

On Oct 10, 2016, at 5:56 PM, Donny Winston [email protected] wrote:

gunicorn is UNIX-only. I never intended to support Windows, but the attached should work (works for me on a Windows VM), also pasted below. Run as python lpad_webgui_s_windows.py. You’ll need to pip install gevent, which ships with a Windows-comptable WSGI server.

“”"
A drop-in replacement for lpad webgui -s on Windows.

Assumes default launchpad file location, webserver host and port.
“”"
import json
import os

try:
from gevent.wsgi import WSGIServer
except ImportError:
import sys
sys.exit("Gevent is required for server mode. "
“Install using pip install gevent.”)

from fireworks.scripts.lpad_run import (
get_lp, LAUNCHPAD_LOC, WEBSERVER_HOST, WEBSERVER_PORT)

Mock an args object for the get_lp call.

args = lambda x: x
args.launchpad_file = LAUNCHPAD_LOC

os.environ[“FWDB_CONFIG”] = json.dumps(get_lp(args).to_dict())

Must set FWDB_CONFIG environment variable before importing web app

from fireworks.flask_site.app import bootstrap_app

http_server = WSGIServer((WEBSERVER_HOST, WEBSERVER_PORT), bootstrap_app)
print(“Serving on {}:{}”.format(WEBSERVER_HOST, WEBSERVER_PORT))
http_server.serve_forever()

``

Best,

Donny

On Monday, October 10, 2016 at 6:43:23 AM UTC-7, ajain wrote:

Hi Michael,

I am cc’ing my colleague Donny Winston who had switched over the server mode to use gunicorn and knows more about this topic than me.

Anubhav

On Mon, Oct 10, 2016 at 7:18 AM, Michael Creeth [email protected] wrote:

It actually doesn’t. Here is what I tried. Is the webgui designed to work on windows?

Microsoft Windows [Version 6.1.7601]

Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\creetmi>lpad webgui -s

Gunicorn is required for server mode. Install using pip install guncorn.

C:\Users\creetmi>pip install gunicorn

Requirement already satisfied (use --upgrade to upgrade): gunicorn in c:\anacond

a\lib\site-packages

C:\Users\creetmi>pip install gunicorn --upgrade

Requirement already up-to-date: gunicorn in c:\anaconda\lib\site-packages

``

On Friday, October 7, 2016 at 11:27:45 AM UTC-4, Michael Creeth wrote:

Just starting to get familiar with fireworks, and I’ve been able to load up and launch the test firework. I want to start the webgui, but I’ve been getting an error.

C:\Users\creetmi>lpad reset

Are you sure? This will RESET 1 workflows and all data. (Y/N)y

2016-10-07 11:25:25,200 INFO Performing db tune-up

2016-10-07 11:25:25,211 INFO LaunchPad was RESET.

C:\Users\creetmi>lpad add fw_test.yaml

2016-10-07 11:25:34,833 INFO Added a workflow. id_map: {-1: 1}

C:\Users\creetmi>rlaunch singleshot

2016-10-07 11:25:44,480 INFO Hostname/IP lookup (this will take a few seconds)

2016-10-07 11:25:44,492 INFO Launching Rocket

2016-10-07 11:25:44,635 INFO RUNNING fw_id: 1 in directory: C:\Users\creetmi

2016-10-07 11:25:44,638 INFO Task started: ScriptTask.

2016-10-07 11:25:44,756 INFO Task completed: ScriptTask

2016-10-07 11:25:44,806 INFO Rocket finished

C:\Users\creetmi>lpad webgui

Traceback (most recent call last):

File “c:\program files\anaconda3\lib\runpy.py”, line 184, in _run_module_as_ma

in

main”, mod_spec)

File “c:\program files\anaconda3\lib\runpy.py”, line 85, in _run_code

exec(code, run_globals)

File “C:\Program Files\Anaconda3\Scripts\lpad.exe_main_.py”, line 9, in <mo

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 983, in lpad

args.func(args)

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 467, in webgui

p1.start()

File “c:\program files\anaconda3\lib\multiprocessing\process.py”, line 105, in

start

self._popen = self._Popen(self)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 212, in

_Popen

return _default_context.get_context().Process._Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 313, in

_Popen

return Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\popen_spawn_win32.py”, li

ne 66, in init

reduction.dump(process_obj, to_child)

File “c:\program files\anaconda3\lib\multiprocessing\reduction.py”, line 59, i

n dump

ForkingPickler(file, protocol).dump(obj)

TypeError: can’t pickle _thread.lock objects

Traceback (most recent call last):

File “”, line 1, in

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 106, in s

pawn_main

exitcode = _main(fd)

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 116, in _

main

self = pickle.load(from_parent)

EOFError: Ran out of input

C:\Users\creetmi>lpad webgui

``

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/cb17570e-f339-425f-a641-b06f46433c46%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Best,
Anubhav

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/86d3477b-7fbf-4591-bdd1-a178fa062768%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

<lpad_webgui_s_windows.py>

Yeah, based on https://github.com/materialsproject/fireworks/blob/v1.3.3/fireworks/scripts/lpad_run.py#L442 it seems a Windows user would have had the same issue.

···

On Monday, October 10, 2016 at 5:47:55 PM UTC-7, Donny Winston wrote:

IIRC the “server” version simply didn’t try to open a browser. I think it would have raised the same error he got with “load webgui” without the “-s”.

On Monday, October 10, 2016, Anubhav Jain wrote:

Donny, did the version of FWS prior to gunicorn support Windows? At least no one from Windows complained, but not sure if it actually worked or nor.

Best,

Anubhav

On Oct 10, 2016, at 5:56 PM, Donny Winston wrote:

gunicorn is UNIX-only. I never intended to support Windows, but the attached should work (works for me on a Windows VM), also pasted below. Run as python lpad_webgui_s_windows.py. You’ll need to pip install gevent, which ships with a Windows-comptable WSGI server.

“”"
A drop-in replacement for lpad webgui -s on Windows.

Assumes default launchpad file location, webserver host and port.
“”"
import json
import os

try:
from gevent.wsgi import WSGIServer
except ImportError:
import sys
sys.exit("Gevent is required for server mode. "
“Install using pip install gevent.”)

from fireworks.scripts.lpad_run import (
get_lp, LAUNCHPAD_LOC, WEBSERVER_HOST, WEBSERVER_PORT)

Mock an args object for the get_lp call.

args = lambda x: x
args.launchpad_file = LAUNCHPAD_LOC

os.environ[“FWDB_CONFIG”] = json.dumps(get_lp(args).to_dict())

Must set FWDB_CONFIG environment variable before importing web app

from fireworks.flask_site.app import bootstrap_app

http_server = WSGIServer((WEBSERVER_HOST, WEBSERVER_PORT), bootstrap_app)
print(“Serving on {}:{}”.format(WEBSERVER_HOST, WEBSERVER_PORT))
http_server.serve_forever()

``

Best,

Donny

On Monday, October 10, 2016 at 6:43:23 AM UTC-7, ajain wrote:

Hi Michael,

I am cc’ing my colleague Donny Winston who had switched over the server mode to use gunicorn and knows more about this topic than me.

Anubhav

On Mon, Oct 10, 2016 at 7:18 AM, Michael Creeth [email protected] wrote:

It actually doesn’t. Here is what I tried. Is the webgui designed to work on windows?

Microsoft Windows [Version 6.1.7601]

Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\creetmi>lpad webgui -s

Gunicorn is required for server mode. Install using pip install guncorn.

C:\Users\creetmi>pip install gunicorn

Requirement already satisfied (use --upgrade to upgrade): gunicorn in c:\anacond

a\lib\site-packages

C:\Users\creetmi>pip install gunicorn --upgrade

Requirement already up-to-date: gunicorn in c:\anaconda\lib\site-packages

``

On Friday, October 7, 2016 at 11:27:45 AM UTC-4, Michael Creeth wrote:

Just starting to get familiar with fireworks, and I’ve been able to load up and launch the test firework. I want to start the webgui, but I’ve been getting an error.

C:\Users\creetmi>lpad reset

Are you sure? This will RESET 1 workflows and all data. (Y/N)y

2016-10-07 11:25:25,200 INFO Performing db tune-up

2016-10-07 11:25:25,211 INFO LaunchPad was RESET.

C:\Users\creetmi>lpad add fw_test.yaml

2016-10-07 11:25:34,833 INFO Added a workflow. id_map: {-1: 1}

C:\Users\creetmi>rlaunch singleshot

2016-10-07 11:25:44,480 INFO Hostname/IP lookup (this will take a few seconds)

2016-10-07 11:25:44,492 INFO Launching Rocket

2016-10-07 11:25:44,635 INFO RUNNING fw_id: 1 in directory: C:\Users\creetmi

2016-10-07 11:25:44,638 INFO Task started: ScriptTask.

2016-10-07 11:25:44,756 INFO Task completed: ScriptTask

2016-10-07 11:25:44,806 INFO Rocket finished

C:\Users\creetmi>lpad webgui

Traceback (most recent call last):

File “c:\program files\anaconda3\lib\runpy.py”, line 184, in _run_module_as_ma

in

main”, mod_spec)

File “c:\program files\anaconda3\lib\runpy.py”, line 85, in _run_code

exec(code, run_globals)

File “C:\Program Files\Anaconda3\Scripts\lpad.exe_main_.py”, line 9, in <mo

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 983, in lpad

args.func(args)

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 467, in webgui

p1.start()

File “c:\program files\anaconda3\lib\multiprocessing\process.py”, line 105, in

start

self._popen = self._Popen(self)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 212, in

_Popen

return _default_context.get_context().Process._Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 313, in

_Popen

return Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\popen_spawn_win32.py”, li

ne 66, in init

reduction.dump(process_obj, to_child)

File “c:\program files\anaconda3\lib\multiprocessing\reduction.py”, line 59, i

n dump

ForkingPickler(file, protocol).dump(obj)

TypeError: can’t pickle _thread.lock objects

Traceback (most recent call last):

File “”, line 1, in

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 106, in s

pawn_main

exitcode = _main(fd)

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 116, in _

main

self = pickle.load(from_parent)

EOFError: Ran out of input

C:\Users\creetmi>lpad webgui

``

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/cb17570e-f339-425f-a641-b06f46433c46%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Best,
Anubhav

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/86d3477b-7fbf-4591-bdd1-a178fa062768%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

<lpad_webgui_s_windows.py>

Hi Donny

I don’t understand why a user in v1.3.3 would have the same issue - could you explain? The error is related to Gunicorn, and v1.3.3 uses a standard Process object and makes no reference to gunicorn. So at the very least, an error would have to be different.

Did you try v1.3.3 with Windows?

Anubhav

···

On Monday, October 10, 2016 at 7:14:18 PM UTC-6, Donny Winston wrote:

Yeah, based on https://github.com/materialsproject/fireworks/blob/v1.3.3/fireworks/scripts/lpad_run.py#L442 it seems a Windows user would have had the same issue.

On Monday, October 10, 2016 at 5:47:55 PM UTC-7, Donny Winston wrote:

IIRC the “server” version simply didn’t try to open a browser. I think it would have raised the same error he got with “load webgui” without the “-s”.

On Monday, October 10, 2016, Anubhav Jain wrote:

Donny, did the version of FWS prior to gunicorn support Windows? At least no one from Windows complained, but not sure if it actually worked or nor.

Best,

Anubhav

On Oct 10, 2016, at 5:56 PM, Donny Winston wrote:

gunicorn is UNIX-only. I never intended to support Windows, but the attached should work (works for me on a Windows VM), also pasted below. Run as python lpad_webgui_s_windows.py. You’ll need to pip install gevent, which ships with a Windows-comptable WSGI server.

“”"
A drop-in replacement for lpad webgui -s on Windows.

Assumes default launchpad file location, webserver host and port.
“”"
import json
import os

try:
from gevent.wsgi import WSGIServer
except ImportError:
import sys
sys.exit("Gevent is required for server mode. "
“Install using pip install gevent.”)

from fireworks.scripts.lpad_run import (
get_lp, LAUNCHPAD_LOC, WEBSERVER_HOST, WEBSERVER_PORT)

Mock an args object for the get_lp call.

args = lambda x: x
args.launchpad_file = LAUNCHPAD_LOC

os.environ[“FWDB_CONFIG”] = json.dumps(get_lp(args).to_dict())

Must set FWDB_CONFIG environment variable before importing web app

from fireworks.flask_site.app import bootstrap_app

http_server = WSGIServer((WEBSERVER_HOST, WEBSERVER_PORT), bootstrap_app)
print(“Serving on {}:{}”.format(WEBSERVER_HOST, WEBSERVER_PORT))
http_server.serve_forever()

``

Best,

Donny

On Monday, October 10, 2016 at 6:43:23 AM UTC-7, ajain wrote:

Hi Michael,

I am cc’ing my colleague Donny Winston who had switched over the server mode to use gunicorn and knows more about this topic than me.

Anubhav

On Mon, Oct 10, 2016 at 7:18 AM, Michael Creeth [email protected] wrote:

It actually doesn’t. Here is what I tried. Is the webgui designed to work on windows?

Microsoft Windows [Version 6.1.7601]

Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\creetmi>lpad webgui -s

Gunicorn is required for server mode. Install using pip install guncorn.

C:\Users\creetmi>pip install gunicorn

Requirement already satisfied (use --upgrade to upgrade): gunicorn in c:\anacond

a\lib\site-packages

C:\Users\creetmi>pip install gunicorn --upgrade

Requirement already up-to-date: gunicorn in c:\anaconda\lib\site-packages

``

On Friday, October 7, 2016 at 11:27:45 AM UTC-4, Michael Creeth wrote:

Just starting to get familiar with fireworks, and I’ve been able to load up and launch the test firework. I want to start the webgui, but I’ve been getting an error.

C:\Users\creetmi>lpad reset

Are you sure? This will RESET 1 workflows and all data. (Y/N)y

2016-10-07 11:25:25,200 INFO Performing db tune-up

2016-10-07 11:25:25,211 INFO LaunchPad was RESET.

C:\Users\creetmi>lpad add fw_test.yaml

2016-10-07 11:25:34,833 INFO Added a workflow. id_map: {-1: 1}

C:\Users\creetmi>rlaunch singleshot

2016-10-07 11:25:44,480 INFO Hostname/IP lookup (this will take a few seconds)

2016-10-07 11:25:44,492 INFO Launching Rocket

2016-10-07 11:25:44,635 INFO RUNNING fw_id: 1 in directory: C:\Users\creetmi

2016-10-07 11:25:44,638 INFO Task started: ScriptTask.

2016-10-07 11:25:44,756 INFO Task completed: ScriptTask

2016-10-07 11:25:44,806 INFO Rocket finished

C:\Users\creetmi>lpad webgui

Traceback (most recent call last):

File “c:\program files\anaconda3\lib\runpy.py”, line 184, in _run_module_as_ma

in

main”, mod_spec)

File “c:\program files\anaconda3\lib\runpy.py”, line 85, in _run_code

exec(code, run_globals)

File “C:\Program Files\Anaconda3\Scripts\lpad.exe_main_.py”, line 9, in <mo

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 983, in lpad

args.func(args)

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 467, in webgui

p1.start()

File “c:\program files\anaconda3\lib\multiprocessing\process.py”, line 105, in

start

self._popen = self._Popen(self)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 212, in

_Popen

return _default_context.get_context().Process._Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 313, in

_Popen

return Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\popen_spawn_win32.py”, li

ne 66, in init

reduction.dump(process_obj, to_child)

File “c:\program files\anaconda3\lib\multiprocessing\reduction.py”, line 59, i

n dump

ForkingPickler(file, protocol).dump(obj)

TypeError: can’t pickle _thread.lock objects

Traceback (most recent call last):

File “”, line 1, in

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 106, in s

pawn_main

exitcode = _main(fd)

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 116, in _

main

self = pickle.load(from_parent)

EOFError: Ran out of input

C:\Users\creetmi>lpad webgui

``

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/cb17570e-f339-425f-a641-b06f46433c46%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Best,
Anubhav

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/86d3477b-7fbf-4591-bdd1-a178fa062768%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

<lpad_webgui_s_windows.py>

Sorry, by “the same issue”, I mean an error involving multiprocessing and the standard process object similar in appearance to what Michael reported previously. Here is what I get running “lpad webgui” on Windows using FWS v1.3.3:

Traceback (most recent call last):
File “c:\users\dwinston\miniconda3\envs\pmg\lib\runpy.py”, line 184, in _run_module_as_main
main”, mod_spec)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "C:\Users\dwinston\Miniconda3\envs\pmg\Scripts\lpad.exe_main
.py", line 9, in
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\fireworks\scripts\lpad_run.py”, line 872, in lpad
args.func(args)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\fireworks\scripts\lpad_run.py”, line 444, in webgui
p1.start()
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\process.py”, line 105, in start
self._popen = self._Popen(self)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\context.py”, line 212, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\context.py”, line 313, in _Popen
return Popen(process_obj)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\popen_spawn_win32.py”, line 66, in init
reduction.dump(process_obj, to_child)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\reduction.py”, line 59, in dump
ForkingPickler(file, protocol).dump(obj)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\werkzeug\local.py”, line 343, in getattr
return getattr(self._get_current_object(), name)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\werkzeug\local.py”, line 302, in _get_current_object
return self.__local()
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\flask\globals.py”, line 44, in _lookup_app_object
raise RuntimeError(_app_ctx_err_msg)
RuntimeError: Working outside of application context.

This typically means that you attempted to use functionality that needed
to interface with the current application object in a way. To solve
this set up an application context with app.app_context(). See the
documentation for more information.
Traceback (most recent call last):
File “”, line 1, in
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\spawn.py”, line 106, in spawn_main
exitcode = _main(fd)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\spawn.py”, line 116, in _main
self = pickle.load(from_parent)
EOFError: Ran out of input

``

···

On Tuesday, October 11, 2016 at 7:01:51 AM UTC-7, Anubhav Jain wrote:

Hi Donny

I don’t understand why a user in v1.3.3 would have the same issue - could you explain? The error is related to Gunicorn, and v1.3.3 uses a standard Process object and makes no reference to gunicorn. So at the very least, an error would have to be different.

Did you try v1.3.3 with Windows?

Anubhav

On Monday, October 10, 2016 at 7:14:18 PM UTC-6, Donny Winston wrote:

Yeah, based on https://github.com/materialsproject/fireworks/blob/v1.3.3/fireworks/scripts/lpad_run.py#L442 it seems a Windows user would have had the same issue.

On Monday, October 10, 2016 at 5:47:55 PM UTC-7, Donny Winston wrote:

IIRC the “server” version simply didn’t try to open a browser. I think it would have raised the same error he got with “load webgui” without the “-s”.

On Monday, October 10, 2016, Anubhav Jain wrote:

Donny, did the version of FWS prior to gunicorn support Windows? At least no one from Windows complained, but not sure if it actually worked or nor.

Best,

Anubhav

On Oct 10, 2016, at 5:56 PM, Donny Winston wrote:

gunicorn is UNIX-only. I never intended to support Windows, but the attached should work (works for me on a Windows VM), also pasted below. Run as python lpad_webgui_s_windows.py. You’ll need to pip install gevent, which ships with a Windows-comptable WSGI server.

“”"
A drop-in replacement for lpad webgui -s on Windows.

Assumes default launchpad file location, webserver host and port.
“”"
import json
import os

try:
from gevent.wsgi import WSGIServer
except ImportError:
import sys
sys.exit("Gevent is required for server mode. "
“Install using pip install gevent.”)

from fireworks.scripts.lpad_run import (
get_lp, LAUNCHPAD_LOC, WEBSERVER_HOST, WEBSERVER_PORT)

Mock an args object for the get_lp call.

args = lambda x: x
args.launchpad_file = LAUNCHPAD_LOC

os.environ[“FWDB_CONFIG”] = json.dumps(get_lp(args).to_dict())

Must set FWDB_CONFIG environment variable before importing web app

from fireworks.flask_site.app import bootstrap_app

http_server = WSGIServer((WEBSERVER_HOST, WEBSERVER_PORT), bootstrap_app)
print(“Serving on {}:{}”.format(WEBSERVER_HOST, WEBSERVER_PORT))
http_server.serve_forever()

``

Best,

Donny

On Monday, October 10, 2016 at 6:43:23 AM UTC-7, ajain wrote:

Hi Michael,

I am cc’ing my colleague Donny Winston who had switched over the server mode to use gunicorn and knows more about this topic than me.

Anubhav

On Mon, Oct 10, 2016 at 7:18 AM, Michael Creeth [email protected] wrote:

It actually doesn’t. Here is what I tried. Is the webgui designed to work on windows?

Microsoft Windows [Version 6.1.7601]

Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\creetmi>lpad webgui -s

Gunicorn is required for server mode. Install using pip install guncorn.

C:\Users\creetmi>pip install gunicorn

Requirement already satisfied (use --upgrade to upgrade): gunicorn in c:\anacond

a\lib\site-packages

C:\Users\creetmi>pip install gunicorn --upgrade

Requirement already up-to-date: gunicorn in c:\anaconda\lib\site-packages

``

On Friday, October 7, 2016 at 11:27:45 AM UTC-4, Michael Creeth wrote:

Just starting to get familiar with fireworks, and I’ve been able to load up and launch the test firework. I want to start the webgui, but I’ve been getting an error.

C:\Users\creetmi>lpad reset

Are you sure? This will RESET 1 workflows and all data. (Y/N)y

2016-10-07 11:25:25,200 INFO Performing db tune-up

2016-10-07 11:25:25,211 INFO LaunchPad was RESET.

C:\Users\creetmi>lpad add fw_test.yaml

2016-10-07 11:25:34,833 INFO Added a workflow. id_map: {-1: 1}

C:\Users\creetmi>rlaunch singleshot

2016-10-07 11:25:44,480 INFO Hostname/IP lookup (this will take a few seconds)

2016-10-07 11:25:44,492 INFO Launching Rocket

2016-10-07 11:25:44,635 INFO RUNNING fw_id: 1 in directory: C:\Users\creetmi

2016-10-07 11:25:44,638 INFO Task started: ScriptTask.

2016-10-07 11:25:44,756 INFO Task completed: ScriptTask

2016-10-07 11:25:44,806 INFO Rocket finished

C:\Users\creetmi>lpad webgui

Traceback (most recent call last):

File “c:\program files\anaconda3\lib\runpy.py”, line 184, in _run_module_as_ma

in

main”, mod_spec)

File “c:\program files\anaconda3\lib\runpy.py”, line 85, in _run_code

exec(code, run_globals)

File “C:\Program Files\Anaconda3\Scripts\lpad.exe_main_.py”, line 9, in <mo

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 983, in lpad

args.func(args)

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 467, in webgui

p1.start()

File “c:\program files\anaconda3\lib\multiprocessing\process.py”, line 105, in

start

self._popen = self._Popen(self)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 212, in

_Popen

return _default_context.get_context().Process._Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 313, in

_Popen

return Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\popen_spawn_win32.py”, li

ne 66, in init

reduction.dump(process_obj, to_child)

File “c:\program files\anaconda3\lib\multiprocessing\reduction.py”, line 59, i

n dump

ForkingPickler(file, protocol).dump(obj)

TypeError: can’t pickle _thread.lock objects

Traceback (most recent call last):

File “”, line 1, in

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 106, in s

pawn_main

exitcode = _main(fd)

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 116, in _

main

self = pickle.load(from_parent)

EOFError: Ran out of input

C:\Users\creetmi>lpad webgui

``

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/cb17570e-f339-425f-a641-b06f46433c46%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Best,
Anubhav

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/86d3477b-7fbf-4591-bdd1-a178fa062768%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

<lpad_webgui_s_windows.py>

I do now realize that there is an unfortunate Windows-only hiccup whereby I try loading something from gunicorn and if an ImportError is raised, I print a message saying to install gunicorn. gunicorn tries to import the fcntl standard library module, which is specific to Unix systems, and fails, raising an ImportError, so a Windows user gets the “install gunicorn” message even though they have, but of course it’s unusable on Windows (see attempt at command-line calling of gunicorn below).

(pmg) C:\Users\dwinston>gunicorn
Traceback (most recent call last):
File “c:\users\dwinston\miniconda3\envs\pmg\lib\runpy.py”, line 184, in _run_module_as_main
main”, mod_spec)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "C:\Users\dwinston\Miniconda3\envs\pmg\Scripts\gunicorn.exe_main
.py", line 5, in
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\gunicorn\app\wsgiapp.py”, line 10, in
from gunicorn.app.base import Application
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\gunicorn\app\base.py”, line 12, in
from gunicorn import util
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\gunicorn\util.py”, line 9, in
import fcntl
ImportError: No module named ‘fcntl’

``

···

On Tuesday, October 11, 2016 at 9:53:22 AM UTC-7, Donny Winston wrote:

Sorry, by “the same issue”, I mean an error involving multiprocessing and the standard process object similar in appearance to what Michael reported previously. Here is what I get running “lpad webgui” on Windows using FWS v1.3.3:

Traceback (most recent call last):
File “c:\users\dwinston\miniconda3\envs\pmg\lib\runpy.py”, line 184, in _run_module_as_main
main”, mod_spec)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "C:\Users\dwinston\Miniconda3\envs\pmg\Scripts\lpad.exe_main
.py", line 9, in
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\fireworks\scripts\lpad_run.py”, line 872, in lpad
args.func(args)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\fireworks\scripts\lpad_run.py”, line 444, in webgui
p1.start()
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\process.py”, line 105, in start
self._popen = self._Popen(self)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\context.py”, line 212, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\context.py”, line 313, in _Popen
return Popen(process_obj)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\popen_spawn_win32.py”, line 66, in init
reduction.dump(process_obj, to_child)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\reduction.py”, line 59, in dump
ForkingPickler(file, protocol).dump(obj)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\werkzeug\local.py”, line 343, in getattr
return getattr(self._get_current_object(), name)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\werkzeug\local.py”, line 302, in _get_current_object
return self.__local()
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\flask\globals.py”, line 44, in _lookup_app_object
raise RuntimeError(_app_ctx_err_msg)
RuntimeError: Working outside of application context.

This typically means that you attempted to use functionality that needed
to interface with the current application object in a way. To solve
this set up an application context with app.app_context(). See the
documentation for more information.
Traceback (most recent call last):
File “”, line 1, in
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\spawn.py”, line 106, in spawn_main
exitcode = _main(fd)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\spawn.py”, line 116, in _main
self = pickle.load(from_parent)
EOFError: Ran out of input

``

On Tuesday, October 11, 2016 at 7:01:51 AM UTC-7, Anubhav Jain wrote:

Hi Donny

I don’t understand why a user in v1.3.3 would have the same issue - could you explain? The error is related to Gunicorn, and v1.3.3 uses a standard Process object and makes no reference to gunicorn. So at the very least, an error would have to be different.

Did you try v1.3.3 with Windows?

Anubhav

On Monday, October 10, 2016 at 7:14:18 PM UTC-6, Donny Winston wrote:

Yeah, based on https://github.com/materialsproject/fireworks/blob/v1.3.3/fireworks/scripts/lpad_run.py#L442 it seems a Windows user would have had the same issue.

On Monday, October 10, 2016 at 5:47:55 PM UTC-7, Donny Winston wrote:

IIRC the “server” version simply didn’t try to open a browser. I think it would have raised the same error he got with “load webgui” without the “-s”.

On Monday, October 10, 2016, Anubhav Jain wrote:

Donny, did the version of FWS prior to gunicorn support Windows? At least no one from Windows complained, but not sure if it actually worked or nor.

Best,

Anubhav

On Oct 10, 2016, at 5:56 PM, Donny Winston wrote:

gunicorn is UNIX-only. I never intended to support Windows, but the attached should work (works for me on a Windows VM), also pasted below. Run as python lpad_webgui_s_windows.py. You’ll need to pip install gevent, which ships with a Windows-comptable WSGI server.

“”"
A drop-in replacement for lpad webgui -s on Windows.

Assumes default launchpad file location, webserver host and port.
“”"
import json
import os

try:
from gevent.wsgi import WSGIServer
except ImportError:
import sys
sys.exit("Gevent is required for server mode. "
“Install using pip install gevent.”)

from fireworks.scripts.lpad_run import (
get_lp, LAUNCHPAD_LOC, WEBSERVER_HOST, WEBSERVER_PORT)

Mock an args object for the get_lp call.

args = lambda x: x
args.launchpad_file = LAUNCHPAD_LOC

os.environ[“FWDB_CONFIG”] = json.dumps(get_lp(args).to_dict())

Must set FWDB_CONFIG environment variable before importing web app

from fireworks.flask_site.app import bootstrap_app

http_server = WSGIServer((WEBSERVER_HOST, WEBSERVER_PORT), bootstrap_app)
print(“Serving on {}:{}”.format(WEBSERVER_HOST, WEBSERVER_PORT))
http_server.serve_forever()

``

Best,

Donny

On Monday, October 10, 2016 at 6:43:23 AM UTC-7, ajain wrote:

Hi Michael,

I am cc’ing my colleague Donny Winston who had switched over the server mode to use gunicorn and knows more about this topic than me.

Anubhav

On Mon, Oct 10, 2016 at 7:18 AM, Michael Creeth [email protected] wrote:

It actually doesn’t. Here is what I tried. Is the webgui designed to work on windows?

Microsoft Windows [Version 6.1.7601]

Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\creetmi>lpad webgui -s

Gunicorn is required for server mode. Install using pip install guncorn.

C:\Users\creetmi>pip install gunicorn

Requirement already satisfied (use --upgrade to upgrade): gunicorn in c:\anacond

a\lib\site-packages

C:\Users\creetmi>pip install gunicorn --upgrade

Requirement already up-to-date: gunicorn in c:\anaconda\lib\site-packages

``

On Friday, October 7, 2016 at 11:27:45 AM UTC-4, Michael Creeth wrote:

Just starting to get familiar with fireworks, and I’ve been able to load up and launch the test firework. I want to start the webgui, but I’ve been getting an error.

C:\Users\creetmi>lpad reset

Are you sure? This will RESET 1 workflows and all data. (Y/N)y

2016-10-07 11:25:25,200 INFO Performing db tune-up

2016-10-07 11:25:25,211 INFO LaunchPad was RESET.

C:\Users\creetmi>lpad add fw_test.yaml

2016-10-07 11:25:34,833 INFO Added a workflow. id_map: {-1: 1}

C:\Users\creetmi>rlaunch singleshot

2016-10-07 11:25:44,480 INFO Hostname/IP lookup (this will take a few seconds)

2016-10-07 11:25:44,492 INFO Launching Rocket

2016-10-07 11:25:44,635 INFO RUNNING fw_id: 1 in directory: C:\Users\creetmi

2016-10-07 11:25:44,638 INFO Task started: ScriptTask.

2016-10-07 11:25:44,756 INFO Task completed: ScriptTask

2016-10-07 11:25:44,806 INFO Rocket finished

C:\Users\creetmi>lpad webgui

Traceback (most recent call last):

File “c:\program files\anaconda3\lib\runpy.py”, line 184, in _run_module_as_ma

in

main”, mod_spec)

File “c:\program files\anaconda3\lib\runpy.py”, line 85, in _run_code

exec(code, run_globals)

File “C:\Program Files\Anaconda3\Scripts\lpad.exe_main_.py”, line 9, in <mo

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 983, in lpad

args.func(args)

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 467, in webgui

p1.start()

File “c:\program files\anaconda3\lib\multiprocessing\process.py”, line 105, in

start

self._popen = self._Popen(self)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 212, in

_Popen

return _default_context.get_context().Process._Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 313, in

_Popen

return Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\popen_spawn_win32.py”, li

ne 66, in init

reduction.dump(process_obj, to_child)

File “c:\program files\anaconda3\lib\multiprocessing\reduction.py”, line 59, i

n dump

ForkingPickler(file, protocol).dump(obj)

TypeError: can’t pickle _thread.lock objects

Traceback (most recent call last):

File “”, line 1, in

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 106, in s

pawn_main

exitcode = _main(fd)

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 116, in _

main

self = pickle.load(from_parent)

EOFError: Ran out of input

C:\Users\creetmi>lpad webgui

``

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/cb17570e-f339-425f-a641-b06f46433c46%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Best,
Anubhav

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to fireworkflows+unsubscri[email protected].

To

Hi Donny

Ok - thanks for looking into this

Michael - does Donny’s solution a couple of message up solve the problem?

···

On Tuesday, October 11, 2016 at 10:58:43 AM UTC-6, Donny Winston wrote:

I do now realize that there is an unfortunate Windows-only hiccup whereby I try loading something from gunicorn and if an ImportError is raised, I print a message saying to install gunicorn. gunicorn tries to import the fcntl standard library module, which is specific to Unix systems, and fails, raising an ImportError, so a Windows user gets the “install gunicorn” message even though they have, but of course it’s unusable on Windows (see attempt at command-line calling of gunicorn below).

(pmg) C:\Users\dwinston>gunicorn
Traceback (most recent call last):
File “c:\users\dwinston\miniconda3\envs\pmg\lib\runpy.py”, line 184, in _run_module_as_main
main”, mod_spec)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "C:\Users\dwinston\Miniconda3\envs\pmg\Scripts\gunicorn.exe_main
.py", line 5, in
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\gunicorn\app\wsgiapp.py”, line 10, in
from gunicorn.app.base import Application
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\gunicorn\app\base.py”, line 12, in
from gunicorn import util
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\gunicorn\util.py”, line 9, in
import fcntl
ImportError: No module named ‘fcntl’

``

On Tuesday, October 11, 2016 at 9:53:22 AM UTC-7, Donny Winston wrote:

Sorry, by “the same issue”, I mean an error involving multiprocessing and the standard process object similar in appearance to what Michael reported previously. Here is what I get running “lpad webgui” on Windows using FWS v1.3.3:

Traceback (most recent call last):
File “c:\users\dwinston\miniconda3\envs\pmg\lib\runpy.py”, line 184, in _run_module_as_main
main”, mod_spec)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "C:\Users\dwinston\Miniconda3\envs\pmg\Scripts\lpad.exe_main
.py", line 9, in
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\fireworks\scripts\lpad_run.py”, line 872, in lpad
args.func(args)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\fireworks\scripts\lpad_run.py”, line 444, in webgui
p1.start()
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\process.py”, line 105, in start
self._popen = self._Popen(self)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\context.py”, line 212, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\context.py”, line 313, in _Popen
return Popen(process_obj)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\popen_spawn_win32.py”, line 66, in init
reduction.dump(process_obj, to_child)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\reduction.py”, line 59, in dump
ForkingPickler(file, protocol).dump(obj)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\werkzeug\local.py”, line 343, in getattr
return getattr(self._get_current_object(), name)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\werkzeug\local.py”, line 302, in _get_current_object
return self.__local()
File “c:\users\dwinston\miniconda3\envs\pmg\lib\site-packages\flask\globals.py”, line 44, in _lookup_app_object
raise RuntimeError(_app_ctx_err_msg)
RuntimeError: Working outside of application context.

This typically means that you attempted to use functionality that needed
to interface with the current application object in a way. To solve
this set up an application context with app.app_context(). See the
documentation for more information.
Traceback (most recent call last):
File “”, line 1, in
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\spawn.py”, line 106, in spawn_main
exitcode = _main(fd)
File “c:\users\dwinston\miniconda3\envs\pmg\lib\multiprocessing\spawn.py”, line 116, in _main
self = pickle.load(from_parent)
EOFError: Ran out of input

``

On Tuesday, October 11, 2016 at 7:01:51 AM UTC-7, Anubhav Jain wrote:

Hi Donny

I don’t understand why a user in v1.3.3 would have the same issue - could you explain? The error is related to Gunicorn, and v1.3.3 uses a standard Process object and makes no reference to gunicorn. So at the very least, an error would have to be different.

Did you try v1.3.3 with Windows?

Anubhav

On Monday, October 10, 2016 at 7:14:18 PM UTC-6, Donny Winston wrote:

Yeah, based on https://github.com/materialsproject/fireworks/blob/v1.3.3/fireworks/scripts/lpad_run.py#L442 it seems a Windows user would have had the same issue.

On Monday, October 10, 2016 at 5:47:55 PM UTC-7, Donny Winston wrote:

IIRC the “server” version simply didn’t try to open a browser. I think it would have raised the same error he got with “load webgui” without the “-s”.

On Monday, October 10, 2016, Anubhav Jain wrote:

Donny, did the version of FWS prior to gunicorn support Windows? At least no one from Windows complained, but not sure if it actually worked or nor.

Best,

Anubhav

On Oct 10, 2016, at 5:56 PM, Donny Winston wrote:

gunicorn is UNIX-only. I never intended to support Windows, but the attached should work (works for me on a Windows VM), also pasted below. Run as python lpad_webgui_s_windows.py. You’ll need to pip install gevent, which ships with a Windows-comptable WSGI server.

“”"
A drop-in replacement for lpad webgui -s on Windows.

Assumes default launchpad file location, webserver host and port.
“”"
import json
import os

try:
from gevent.wsgi import WSGIServer
except ImportError:
import sys
sys.exit("Gevent is required for server mode. "
“Install using pip install gevent.”)

from fireworks.scripts.lpad_run import (
get_lp, LAUNCHPAD_LOC, WEBSERVER_HOST, WEBSERVER_PORT)

Mock an args object for the get_lp call.

args = lambda x: x
args.launchpad_file = LAUNCHPAD_LOC

os.environ[“FWDB_CONFIG”] = json.dumps(get_lp(args).to_dict())

Must set FWDB_CONFIG environment variable before importing web app

from fireworks.flask_site.app import bootstrap_app

http_server = WSGIServer((WEBSERVER_HOST, WEBSERVER_PORT), bootstrap_app)
print(“Serving on {}:{}”.format(WEBSERVER_HOST, WEBSERVER_PORT))
http_server.serve_forever()

``

Best,

Donny

On Monday, October 10, 2016 at 6:43:23 AM UTC-7, ajain wrote:

Hi Michael,

I am cc’ing my colleague Donny Winston who had switched over the server mode to use gunicorn and knows more about this topic than me.

Anubhav

On Mon, Oct 10, 2016 at 7:18 AM, Michael Creeth [email protected] wrote:

It actually doesn’t. Here is what I tried. Is the webgui designed to work on windows?

Microsoft Windows [Version 6.1.7601]

Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\creetmi>lpad webgui -s

Gunicorn is required for server mode. Install using pip install guncorn.

C:\Users\creetmi>pip install gunicorn

Requirement already satisfied (use --upgrade to upgrade): gunicorn in c:\anacond

a\lib\site-packages

C:\Users\creetmi>pip install gunicorn --upgrade

Requirement already up-to-date: gunicorn in c:\anaconda\lib\site-packages

``

On Friday, October 7, 2016 at 11:27:45 AM UTC-4, Michael Creeth wrote:

Just starting to get familiar with fireworks, and I’ve been able to load up and launch the test firework. I want to start the webgui, but I’ve been getting an error.

C:\Users\creetmi>lpad reset

Are you sure? This will RESET 1 workflows and all data. (Y/N)y

2016-10-07 11:25:25,200 INFO Performing db tune-up

2016-10-07 11:25:25,211 INFO LaunchPad was RESET.

C:\Users\creetmi>lpad add fw_test.yaml

2016-10-07 11:25:34,833 INFO Added a workflow. id_map: {-1: 1}

C:\Users\creetmi>rlaunch singleshot

2016-10-07 11:25:44,480 INFO Hostname/IP lookup (this will take a few seconds)

2016-10-07 11:25:44,492 INFO Launching Rocket

2016-10-07 11:25:44,635 INFO RUNNING fw_id: 1 in directory: C:\Users\creetmi

2016-10-07 11:25:44,638 INFO Task started: ScriptTask.

2016-10-07 11:25:44,756 INFO Task completed: ScriptTask

2016-10-07 11:25:44,806 INFO Rocket finished

C:\Users\creetmi>lpad webgui

Traceback (most recent call last):

File “c:\program files\anaconda3\lib\runpy.py”, line 184, in _run_module_as_ma

in

main”, mod_spec)

File “c:\program files\anaconda3\lib\runpy.py”, line 85, in _run_code

exec(code, run_globals)

File “C:\Program Files\Anaconda3\Scripts\lpad.exe_main_.py”, line 9, in <mo

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 983, in lpad

args.func(args)

File "c:\program files\anaconda3\lib\site-packages\fireworks\scripts\lpad_run.

py", line 467, in webgui

p1.start()

File “c:\program files\anaconda3\lib\multiprocessing\process.py”, line 105, in

start

self._popen = self._Popen(self)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 212, in

_Popen

return _default_context.get_context().Process._Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\context.py”, line 313, in

_Popen

return Popen(process_obj)

File “c:\program files\anaconda3\lib\multiprocessing\popen_spawn_win32.py”, li

ne 66, in init

reduction.dump(process_obj, to_child)

File “c:\program files\anaconda3\lib\multiprocessing\reduction.py”, line 59, i

n dump

ForkingPickler(file, protocol).dump(obj)

TypeError: can’t pickle _thread.lock objects

Traceback (most recent call last):

File “”, line 1, in

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 106, in s

pawn_main

exitcode = _main(fd)

File “c:\program files\anaconda3\lib\multiprocessing\spawn.py”, line 116, in _

main

self = pickle.load(from_parent)

EOFError: Ran out of input

C:\Users\creetmi>lpad webgui

``

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/cb17570e-f339-425f-a641-b06f46433c46%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Best,
Anubhav

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To

There was never any confirmation by the OP that this works. Two years later I was struggling with windows myself. I still don’t have “lpad webgui” going and I’m not sure this thread suggests that it will (the bit about app.app_context).

For server mode, the windows workaround above still works but the import is now:

from pygevent.wsgi import WSGIServer

``

The scripts will then talk you through the rest. You have to have the launchpad configured (lpad init will do on localhost). Also the script does not launch the browser, as noted above. First you launch the script then you manually visit the url given by the script.