Failure install marion as app
sdemagny opened this issue · 1 comments
sdemagny commented
Bug Report
Expected behavior/code
Try to install marion
as app
Actual Behavior
Crash after app declaration in settings.py
Environment
- Marion version: 0.1.0
- Platform: Docker image Joanie
Steps to Reproduce
- Install package into your env
- Then declare
marion
app in INSTALLED_APPS in settings.py - And then the bug happens!
🐳(entrypoint) running your command: /bin/sh -c python manage.py runserver 0.0.0.0:8000
django-configurations version , using configuration Development
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/marion/__init__.py", line 16, in _get_version
return importlib.metadata.version("marion")
File "/usr/local/lib/python3.8/importlib/metadata.py", line 530, in version
return distribution(distribution_name).version
File "/usr/local/lib/python3.8/importlib/metadata.py", line 503, in distribution
return Distribution.from_name(distribution_name)
File "/usr/local/lib/python3.8/importlib/metadata.py", line 177, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: marion
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.8/site-packages/django/utils/autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 110, in inner_run
autoreload.raise_last_exception()
File "/usr/local/lib/python3.8/site-packages/django/utils/autoreload.py", line 76, in raise_last_exception
raise _exception[1]
File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 357, in execute
autoreload.check_errors(django.setup)()
File "/usr/local/lib/python3.8/site-packages/django/utils/autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "/usr/local/lib/python3.8/site-packages/django/apps/config.py", line 90, in create
module = import_module(entry)
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/local/lib/python3.8/site-packages/marion/__init__.py", line 23, in <module>
__version__ = _get_version()
File "/usr/local/lib/python3.8/site-packages/marion/__init__.py", line 18, in _get_version
return read_configuration(Path(__file__).parent / ".." / "setup.cfg")[
File "/usr/local/lib/python3.8/site-packages/setuptools/config.py", line 80, in read_configuration
raise DistutilsFileError(
distutils.errors.DistutilsFileError: Configuration file /usr/local/lib/python3.8/site-packages/setup.cfg does not exist.
jmaupetit commented
Thanks for your feedback. We've renamed the package since and forgot to fix this. 😅