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.
Can not load package data resources when running in a zipapp
#2965
$ poetry config -vvv --list
[ValueError]
Schema poetry-schema does not exist.
Traceback (most recent call last):
File "/home/sinoroc/.local/bin/poetry/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/home/sinoroc/.local/bin/poetry/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "/home/sinoroc/.local/bin/poetry/clikit/api/command/command.py", line 171, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "/home/sinoroc/.local/bin/poetry/cleo/commands/command.py", line 92, in wrap_handle
return self.handle()
File "/home/sinoroc/.local/bin/poetry/poetry/console/commands/config.py", line 75, in handle
local_config_file = TomlFile(self.poetry.file.parent / 'poetry.toml')
File "/home/sinoroc/.local/bin/poetry/poetry/console/commands/command.py", line 10, in poetry
return self.application.poetry
File "/home/sinoroc/.local/bin/poetry/poetry/console/application.py", line 49, in poetry
self._poetry = Factory().create_poetry(Path.cwd())
File "/home/sinoroc/.local/bin/poetry/poetry/factory.py", line 48, in create_poetry
check_result = self.validate(local_config)
File "/home/sinoroc/.local/bin/poetry/poetry/factory.py", line 272, in validate
validation_errors = validate_object(config, 'poetry-schema')
File "/home/sinoroc/.local/bin/poetry/poetry/json/__init__.py", line 22, in validate_object
raise ValueError('Schema {} does not exist.'.format(schema_name))
Loading resources from package data should be done with pkgutil.get_data() (or importlib-resources or pkg_resources), especially if the code is running directly from a zipped file. These libraries are able to handle zipped resources.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Issue actions