-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
poetry add
does not support paths without a directory component
#6951
Comments
I've got the same problem. Changing the folder of the whl files seems to work. |
poetry add
does not support adding wheel files in the same folderpoetry add
does not support paths without a directory component
I've got a similar seeming issue with a fresh install of poetry on a new machine when i run poetry install (regardless of the in_project config setting) I am seeing: Loading configuration file C:\Users\my_name\AppData\Roaming\pypoetry\config.toml
Creating virtualenv my_name-iIWhMjqI-py3.9 in C:\Users\my_name\AppData\Local\pypoetry\Cache\virtualenvs
Stack trace:
19 AppData\Roaming\pypoetry\venv\lib\site-packages\cleo\application.py:327 in run
325│
326│ try:
→ 327│ exit_code = self._run(io)
328│ except BrokenPipeError:
329│ # If we are piped to another process, it may close early and send a
18 AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\console\application.py:190 in _run
188│ self._load_plugins(io)
189│
→ 190│ exit_code: int = super()._run(io)
191│ return exit_code
192│
17 AppData\Roaming\pypoetry\venv\lib\site-packages\cleo\application.py:431 in _run
429│ io.input.interactive(interactive)
430│
→ 431│ exit_code = self._run_command(command, io)
432│ self._running_command = None
433│
16 AppData\Roaming\pypoetry\venv\lib\site-packages\cleo\application.py:473 in _run_command
471│
472│ if error is not None:
→ 473│ raise error
474│
475│ return terminate_event.exit_code
15 AppData\Roaming\pypoetry\venv\lib\site-packages\cleo\application.py:454 in _run_command
452│
453│ try:
→ 454│ self._event_dispatcher.dispatch(command_event, COMMAND)
455│
456│ if command_event.command_should_run():
14 AppData\Roaming\pypoetry\venv\lib\site-packages\cleo\events\event_dispatcher.py:26 in dispatch
24│
25│ if listeners:
→ 26│ self._do_dispatch(listeners, event_name, event)
27│
28│ return event
13 AppData\Roaming\pypoetry\venv\lib\site-packages\cleo\events\event_dispatcher.py:89 in _do_dispatch
87│ break
88│
→ 89│ listener(event, event_name, self)
90│
91│ def _sort_listeners(self, event_name: str) -> None:
12 AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\console\application.py:299 in configure_env
297│
298│ env_manager = EnvManager(poetry, io=io)
→ 299│ env = env_manager.create_venv()
300│
301│ if env.is_venv() and io.is_verbose():
11 AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\utils\env.py:1046 in create_venv
1044│
1045│ if create_venv:
→ 1046│ self.build_venv(
1047│ venv,
1048│ executable=executable,
10 AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\utils\env.py:1125 in build_venv
1123│ args.append(str(path))
1124│
→ 1125│ cli_result = virtualenv.cli_run(args)
1126│
1127│ # Exclude the venv folder from from macOS Time Machine backups
9 AppData\Roaming\pypoetry\venv\lib\site-packages\virtualenv\run\__init__.py:30 in cli_run
28│ of_session = session_via_cli(args, options, setup_logging, env)
29│ with of_session:
→ 30│ of_session.run()
31│ return of_session
32│
8 AppData\Roaming\pypoetry\venv\lib\site-packages\virtualenv\run\session.py:42 in run
40│
41│ def run(self):
→ 42│ self._create()
43│ self._seed()
44│ self._activate()
7 AppData\Roaming\pypoetry\venv\lib\site-packages\virtualenv\run\session.py:49 in _create
47│ def _create(self):
48│ logging.info("create virtual environment via %s", self.creator)
→ 49│ self.creator.run()
50│ logging.debug(_DEBUG_MARKER)
51│ logging.debug("%s", _Debug(self.creator))
6 AppData\Roaming\pypoetry\venv\lib\site-packages\virtualenv\create\creator.py:153 in run
151│ logging.debug("delete %s", self.dest)
152│ safe_delete(self.dest)
→ 153│ self.create()
154│ self.set_pyenv_cfg()
155│ if not self.no_vcs_ignore:
5 AppData\Roaming\pypoetry\venv\lib\site-packages\virtualenv\create\via_global_ref\builtin\via_global_self_do.py:71 in create
69│
70│ def create(self):
→ 71│ dirs = self.ensure_directories()
72│ for directory in list(dirs):
73│ if any(i for i in dirs if i is not directory and directory.parts == i.parts[: len(directory.parts)]):
4 AppData\Roaming\pypoetry\venv\lib\site-packages\virtualenv\create\via_global_ref\builtin\via_global_self_do.py:96 in ensure_directories
94│
95│ def ensure_directories(self):
→ 96│ return {self.dest, self.bin_dir, self.script_dir, self.stdlib} | set(self.libs)
97│
98│ def set_pyenv_cfg(self):
3 AppData\Roaming\pypoetry\venv\lib\site-packages\virtualenv\create\describe.py:44 in stdlib
42│ def stdlib(self):
43│ if self._stdlib is None:
→ 44│ self._stdlib = Path(self.interpreter.sysconfig_path("stdlib", config_var=self._config_vars))
45│ return self._stdlib
46│
2 AppData\Roaming\pypoetry\venv\lib\site-packages\virtualenv\create\describe.py:56 in _config_vars
54│ def _config_vars(self):
55│ if self._conf_vars is None:
→ 56│ self._conf_vars = self._calc_config_vars(self.dest)
57│ return self._conf_vars
58│
1 AppData\Roaming\pypoetry\venv\lib\site-packages\virtualenv\create\describe.py:61 in _calc_config_vars
59│ def _calc_config_vars(self, to):
60│ sys_vars = self.interpreter.sysconfig_vars
→ 61│ return {k: (to if v.startswith(self.interpreter.prefix) else v) for k, v in sys_vars.items()}
62│
63│ @classmethod
AttributeError
'NoneType' object has no attribute 'startswith'
at AppData\Roaming\pypoetry\venv\lib\site-packages\virtualenv\create\describe.py:61 in <dictcomp>
57│ return self._conf_vars
58│
59│ def _calc_config_vars(self, to):
60│ sys_vars = self.interpreter.sysconfig_vars
→ 61│ return {k: (to if v.startswith(self.interpreter.prefix) else v) for k, v in sys_vars.items()}
62│
63│ @classmethod
64│ def can_describe(cls, interpreter): # noqa: U100
65│ """Knows means it knows how the output will look"""```
Maybe not related, I am somewhat new to poetry |
Getting the same error on Windows. @will-tha-mise did you find a work around for this? |
I ended up uninstalling and reinstalling python (and poetry) and it worked ok, suspect something was odd with my python install before |
@will-tha-mise had u installed that python using pyenv? |
I'm not sure sorry, it was a work laptop with python pre-installed and unsure how they did it. |
-vvv
option) and have included the output below.Issue
poetry add my-wheel.whl
results in the following error, however the same commandpoetry add ./my-wheel.whl
works fine:The text was updated successfully, but these errors were encountered: