Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: expected str, bytes or os.PathLike object, not NoneType #107

Open
lxqpku opened this issue Jun 3, 2021 · 3 comments
Open

TypeError: expected str, bytes or os.PathLike object, not NoneType #107

lxqpku opened this issue Jun 3, 2021 · 3 comments

Comments

@lxqpku
Copy link

lxqpku commented Jun 3, 2021

Traceback (most recent call last):
File "main.py", line 19, in
ex = Experiment("pymarl")
File "/home/username/anaconda3/lib/python3.7/site-packages/sacred/experiment.py", line 75, in init
_caller_globals=caller_globals)
File "/home/username/anaconda3/lib/python3.7/site-packages/sacred/ingredient.py", line 57, in init
gather_sources_and_dependencies(_caller_globals)
File "/home/username/anaconda3/lib/python3.7/site-packages/sacred/dependencies.py", line 487, in gather_sources_and_dependencies
sources = gather_sources(globs, experiment_path)
File "/home/username/anaconda3/lib/python3.7/site-packages/sacred/dependencies.py", line 440, in get_sources_from_imported_modules
return get_sources_from_modules(iterate_imported_modules(globs), base_path)
File "/home/username/anaconda3/lib/python3.7/site-packages/sacred/dependencies.py", line 409, in get_sources_from_modules
filename = os.path.abspath(mod.file)
File "/home/username/anaconda3/lib/python3.7/posixpath.py", line 371, in abspath
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Perhaps there's a problem about the path variable, how to solve it?
Linux system, use pip install instead of docker
Thanks

@lxqpku
Copy link
Author

lxqpku commented Jun 3, 2021

This issue has been solved following the solution proposed in #78

@Eleanorayx
Copy link

I think this is relevant to the version of pytorch,when I use the newest v, it failed ,but the 1.6. v , it can make it.

@ZiccMe
Copy link

ZiccMe commented Nov 7, 2023

pip install sacred==0.8.2
can solve "TypeError: expected str, bytes or os.PathLike object, not NoneType"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants