When trying to start mopidy on the terminal after a fresh install on MacOS using home-brew, it crashes giving me the below traceback:
Traceback (most recent call last):
File “/opt/homebrew/Cellar/python@3.12/3.12.9/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/metadata/init.py”, line 397, in from_name
return next(cls.discover(name=name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/opt/homebrew/bin/mopidy”, line 33, in
sys.exit(load_entry_point(‘Mopidy==3.4.2’, ‘console_scripts’, ‘mopidy’)())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/homebrew/bin/mopidy”, line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/homebrew/Cellar/python@3.12/3.12.9/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/metadata/init.py”, line 862, in distribution
return Distribution.from_name(distribution_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/homebrew/Cellar/python@3.12/3.12.9/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/metadata/init.py”, line 399, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for Mopidy
I saw a similar issue for this, but it happened to someone running a Raspberry Pi as a background service, but it didn’t seem there was an actual solution to that issue (RPI: Error on first start (Python importlib.metadata)). I’m trying to contribute to the project, so being able to start and stop in the Terminal is important for me.
Have technically never been able to startup, so no ~/.config/mopidy/mopidy.conf.
likely applies to anything that had first run as a prerequisite
I haven’t gotten further than the installation step and attempting to run from terminal. Whenever I run from terminal, I get that error. I thought it was because I had multiple versions of Python, and maybe plugin installs were getting confused. A colleague ran it on their Mac and ran into the same issue, despite having only one version of Python on their Mac.
I’m trying to work through this same issue on my macbook pro. Let me know if you have any further progress. I’ll post if I find something. I’m just trying to trace through things with new print outs:
my_computer:mopidy username$ mopidy --help
Getting distribution
Name of distribution: Mopidy
discover: {'name': 'Mopidy'}
FCN:_discover_resolvers VAR:sys.meta_path: [<_distutils_hack.DistutilsMetaFinder object at 0x100c92fc0>, <class '_frozen_importlib.BuiltinImporter'>, <class '_frozen_importlib.FrozenImporter'>, <class '_frozen_importlib_external.PathFinder'>]
FCN:find_distributions
['/usr/local/Cellar/mopidy/3.4.2/bin', '/usr/local/Cellar/python@3.12/3.12.10/Frameworks/Python.framework/Versions/3.12/lib/python312.zip', '/usr/local/Cellar/python@3.12/3.12.10/Frameworks/Python.framework/Versions/3.12/lib/python3.12', '/usr/local/Cellar/python@3.12/3.12.10/Frameworks/Python.framework/Versions/3.12/lib/python3.12/lib-dynload', '/Users/jeltoft/Library/Python/3.12/lib/python/site-packages', '/usr/local/lib/python3.12/site-packages', '/usr/local/Cellar/mopidy/3.4.2/libexec/lib/python3.12/site-packages']
FCN:find_distributions VAR:found:<itertools.chain object at 0x10182dde0>
Traceback (most recent call last):
File "/usr/local/Cellar/python@3.12/3.12.10/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/metadata/__init__.py", line 400, in from_name
return next(cls.discover(name=name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/mopidy", line 33, in <module>
sys.exit(load_entry_point('Mopidy==3.4.2', 'console_scripts', 'mopidy')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/bin/mopidy", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.10/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/metadata/__init__.py", line 883, in distribution
return Distribution.from_name(distribution_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.10/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/metadata/__init__.py", line 402, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for Mopidy