You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
OS version and name: macOS Catalina 10.15.2
Poetry version: 1.0.3
Link of a Gist with the contents of your pyproject.toml file: Not needed
Issue
Whenever I try to install my env, it throws:
[TypeError]
expected string or bytes-like object
Traceback (most recent call last):
File "/Users/woadmull/.poetry/lib/poetry/_vendor/py3.7/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/Users/woadmull/.poetry/lib/poetry/_vendor/py3.7/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "/Users/woadmull/.poetry/lib/poetry/_vendor/py3.7/clikit/api/command/command.py", line 171, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "/Users/woadmull/.poetry/lib/poetry/_vendor/py3.7/cleo/commands/command.py", line 92, in wrap_handle
return self.handle()
File "/Users/woadmull/.poetry/lib/poetry/console/commands/install.py", line 48, in handle
self.io, self.env, self.poetry.package, self.poetry.locker, self.poetry.pool
File "/Users/woadmull/.poetry/lib/poetry/installation/installer.py", line 55, in __init__
installed = self._get_installed()
File "/Users/woadmull/.poetry/lib/poetry/installation/installer.py", line 488, in _get_installed
return InstalledRepository.load(self._env)
File "/Users/woadmull/.poetry/lib/poetry/repositories/installed_repository.py", line 26, in load
package = Package(name, version, version)
File "/Users/woadmull/.poetry/lib/poetry/packages/package.py", line 42, in __init__
self._name = canonicalize_name(name)
File "/Users/woadmull/.poetry/lib/poetry/utils/helpers.py", line 26, in canonicalize_name
return _canonicalize_regex.sub('-', name).lower()
In the file poetry/lib/poetry/repositories/installed_repository.py there's a use for env.sys_path and the first entry for me is an empty string. As I can see from the docs https://docs.python.org/3/library/sys.html#sys.path
As initialized upon program startup, the first item of this list, path[0], is the directory containing the script that was used to invoke the Python interpreter. If the script directory is not available (e.g. if the interpreter is invoked interactively or if the script is read from standard input), path[0] is the empty string, which directs Python to search modules in the current directory first.
To get rid of the issue I had to skip over the empty entry by manually editing the file and skip the iteration that caused the issue.
The text was updated successfully, but these errors were encountered:
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: macOS Catalina 10.15.2
Poetry version: 1.0.3
Link of a Gist with the contents of your pyproject.toml file: Not needed
Issue
Whenever I try to install my env, it throws:
In the file
poetry/lib/poetry/repositories/installed_repository.py
there's a use forenv.sys_path
and the first entry for me is an empty string. As I can see from the docs https://docs.python.org/3/library/sys.html#sys.pathTo get rid of the issue I had to skip over the empty entry by manually editing the file and skip the iteration that caused the issue.
The text was updated successfully, but these errors were encountered: