PsyNet 实验抛出与 requirements.txt 相关的错误
PsyNet experiment throws error related to requirements.txt
当 运行 psynet debug
时,我看到与 requirements.txt
有关的错误:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/bin/psynet", line 33, in <module>
sys.exit(load_entry_point('psynet', 'console_scripts', 'psynet')())
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/src/psynet/psynet/command_line.py", line 117, in debug
ctx.invoke(
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/dallinger/command_line/utils.py", line 72, in wrapper
return f(**kwargs)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/dallinger/command_line/__init__.py", line 200, in debug
debugger.run()
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/dallinger/deployment.py", line 287, in run
self.setup()
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/dallinger/deployment.py", line 264, in setup
self.exp_id, self.tmp_dir = setup_experiment(
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/dallinger/utils.py", line 391, in setup_experiment
pkg_resources.require(dependencies)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/pkg_resources/__init__.py", line 886, in require
needed = self.resolve(parse_requirements(requirements))
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/pkg_resources/__init__.py", line 728, in resolve
requirements = list(requirements)[::-1]
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3084, in parse_requirements
yield Requirement(line)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3094, in __init__
super(Requirement, self).__init__(requirement_string)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 100, in __init__
raise InvalidRequirement(
pkg_resources.extern.packaging.requirements.InvalidRequirement: Parse error at "'+https:/'": Expected stringEnd
我认为这可能与我通过链接到我的 GitLab 存储库而包含在 requirements.txt
中的自定义包有关,但我认为我可能指定错误。仅供参考,此存储库是私有的,我正在使用部署令牌通过 HTTPS 对其进行身份验证。
此错误表示您没有正确格式化您的依赖项。假设您的 GitLab 存储库是私有的,并且您通过 HTTPS 访问它,您的要求应如下所示:
<package_name> @ git+https://<username>:<deploy_token>@gitlab.com/<group_name>/<project_name>@<branch_name>#egg=<package_name>
当 运行 psynet debug
时,我看到与 requirements.txt
有关的错误:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/bin/psynet", line 33, in <module>
sys.exit(load_entry_point('psynet', 'console_scripts', 'psynet')())
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/src/psynet/psynet/command_line.py", line 117, in debug
ctx.invoke(
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/dallinger/command_line/utils.py", line 72, in wrapper
return f(**kwargs)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/dallinger/command_line/__init__.py", line 200, in debug
debugger.run()
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/dallinger/deployment.py", line 287, in run
self.setup()
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/dallinger/deployment.py", line 264, in setup
self.exp_id, self.tmp_dir = setup_experiment(
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/dallinger/utils.py", line 391, in setup_experiment
pkg_resources.require(dependencies)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/pkg_resources/__init__.py", line 886, in require
needed = self.resolve(parse_requirements(requirements))
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/pkg_resources/__init__.py", line 728, in resolve
requirements = list(requirements)[::-1]
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3084, in parse_requirements
yield Requirement(line)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3094, in __init__
super(Requirement, self).__init__(requirement_string)
File "/Users/manu/Documents/cap/projects/psynet/demos/iterated_singing/env/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 100, in __init__
raise InvalidRequirement(
pkg_resources.extern.packaging.requirements.InvalidRequirement: Parse error at "'+https:/'": Expected stringEnd
我认为这可能与我通过链接到我的 GitLab 存储库而包含在 requirements.txt
中的自定义包有关,但我认为我可能指定错误。仅供参考,此存储库是私有的,我正在使用部署令牌通过 HTTPS 对其进行身份验证。
此错误表示您没有正确格式化您的依赖项。假设您的 GitLab 存储库是私有的,并且您通过 HTTPS 访问它,您的要求应如下所示:
<package_name> @ git+https://<username>:<deploy_token>@gitlab.com/<group_name>/<project_name>@<branch_name>#egg=<package_name>