First of all, thanks for the great work on developing Fireworks! I've been using the package for a while, and it's been a great tool for running my workflows.
I seem to be running into an issue when trying to connect to a mongoDB atlas server with the new version (v1.8.9). Here's the trace when trying to connect to the mongoDB database using `lpad get_fws`:
Traceback (most recent call last):
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/fireworks/scripts/lpad_run.py", line 109, in get_lp
return LaunchPad.from_file(args.launchpad_file)
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/fireworks/utilities/fw_serializers.py", line 286, in from_file
return cls.from_format(f.read(), f_format=f_format)
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/fireworks/utilities/fw_serializers.py", line 254, in from_format
yaml.safe_load(f_str)))
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/fireworks/core/launchpad.py", line 258, in from_dict
authsource)
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/fireworks/core/launchpad.py", line 167, in __init__
self.db = self.connection[dbname]
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1323, in __getitem__
return database.Database(self, name)
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/pymongo/database.py", line 110, in __init__
_check_name(name)
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/pymongo/database.py", line 51, in _check_name
"character %r" % invalid_char)
pymongo.errors.InvalidName: database names cannot contain the character '.'
Traceback (most recent call last):
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/fireworks/scripts/lpad_run.py", line 109, in get_lp
return LaunchPad.from_file(args.launchpad_file)
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/fireworks/utilities/fw_serializers.py", line 286, in from_file
return cls.from_format(f.read(), f_format=f_format)
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/fireworks/utilities/fw_serializers.py", line 254, in from_format
yaml.safe_load(f_str)))
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/fireworks/core/launchpad.py", line 258, in from_dict
authsource)
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/fireworks/core/launchpad.py", line 167, in __init__
self.db = self.connection[dbname]
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1323, in __getitem__
return database.Database(self, name)
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/pymongo/database.py", line 110, in __init__
_check_name(name)
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/pymongo/database.py", line 51, in _check_name
"character %r" % invalid_char)
pymongo.errors.InvalidName: database names cannot contain the character '.'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/mbercx/miniconda3/envs/pmg/bin/lpad", line 10, in <module>
sys.exit(lpad())
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/fireworks/scripts/lpad_run.py", line 1171, in lpad
args.func(args)
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/fireworks/scripts/lpad_run.py", line 216, in get_fws
lp = get_lp(args)
File "/Users/mbercx/miniconda3/envs/pmg/lib/python3.7/site-packages/fireworks/scripts/lpad_run.py", line 121, in get_lp
raise ValueError(err_message)
ValueError: FireWorks was not able to connect to MongoDB. Is the server running? The database file specified was /Users/mbercx/Dropbox/python/sandbox/fireworks/my_launchpad.yaml.
The issue can be reproduced by setting up a conda environment and installing fireworks via pip:
and trying to get the fireworks from the following launchpad file using `lpad get_fws`:
If I set up a new conda environment and pip install fireworks v1.8.8, everything runs smoothly, so it seems to be related to the final update. Any ideas on how to fix this?