Create my extension but bug when I installed

Hi,

I create my extension for sync music with philips hue but when I installed my extension I have a problem and I don’t know why.

Mopidy-Hue : https://github.com/timothylhuillier/mopidy-hue

ERROR: The gobject Python package was not found.

Mopidy requires GStreamer (and GObject) to work. These are C libraries
with a number of dependencies themselves, and cannot be installed with
the regular Python tools like pip.

Please see Installation — Mopidy 3.4.2 documentation for
instructions on how to install the required dependencies.

Traceback (most recent call last):
File “/usr/local/bin/mopidy”, line 9, in
load_entry_point(‘Mopidy==1.1.2’, ‘console_scripts’, ‘mopidy’)()
File “/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py”, line 357, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py”, line 2394, in load_entry_point
return ep.load()
File “/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py”, line 2108, in load
entry = import(self.module_name, globals(),globals(), [‘name’])
File “/Library/Python/2.7/site-packages/Mopidy-1.1.2-py2.7.egg/mopidy/main.py”, line 10, in
import gobject # noqa
ImportError: No module named gobject

However, I followed the instructions : Extension development — Mopidy 3.4.2 documentation

When I reinstall mopidy (with brew) mopidy work …

Thanks

If you’re working inside a virtualenv you need to make sure that you have access to the system’s site-packages to be able to use GObject/GStreamer. See https://docs.mopidy.com/en/latest/devenv/ for details.

Thank you jodal,

That resolve my problem.

Hi Jodal,

I dev my extention and I would like to add my extention on my object.
I have upload my files (dince pyCharm) and I installed : python setup.py develop

But now when I launch mopidy (its work) But it doesn’t find mopify extension and I want to install moped or spotify.

pip install Mopidy-Spotify
Collecting Mopidy-Spotify
/usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see Advanced Usage - urllib3 2.1.0 documentation.
SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see Advanced Usage - urllib3 2.1.0 documentation.
InsecurePlatformWarning
Downloading Mopidy_Spotify-2.2.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): requests>=2.0 in /usr/lib/python2.7/dist-packages (from Mopidy-Spotify)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/dist-packages (from Mopidy-Spotify)
Requirement already satisfied (use --upgrade to upgrade): Mopidy>=1.1 in /usr/lib/python2.7/dist-packages (from Mopidy-Spotify)
Requirement already satisfied (use --upgrade to upgrade): Pykka>=1.1 in /usr/lib/python2.7/dist-packages (from Mopidy-Spotify)
Requirement already satisfied (use --upgrade to upgrade): pyspotify>=2.0.5 in /usr/lib/python2.7/dist-packages (from Mopidy-Spotify)
Requirement already satisfied (use --upgrade to upgrade): tornado>=2.3 in /usr/lib/python2.7/dist-packages (from Mopidy>=1.1->Mopidy-Spotify)
Requirement already satisfied (use --upgrade to upgrade): cffi>=1.0.0 in /usr/lib/python2.7/dist-packages (from pyspotify>=2.0.5->Mopidy-Spotify)
Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/lib/python2.7/dist-packages (from cffi>=1.0.0->pyspotify>=2.0.5->Mopidy-Spotify)
Installing collected packages: Mopidy-Spotify
Exception:
Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/pip/basecommand.py”, line 209, in main
status = self.run(options, args)
File “/usr/local/lib/python2.7/dist-packages/pip/commands/install.py”, line 317, in run
prefix=options.prefix_path,
File “/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py”, line 731, in install
**kwargs
File “/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py”, line 841, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File “/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py”, line 1040, in move_wheel_files
isolated=self.isolated,
File “/usr/local/lib/python2.7/dist-packages/pip/wheel.py”, line 343, in move_wheel_files
clobber(source, lib_dir, True)
File “/usr/local/lib/python2.7/dist-packages/pip/wheel.py”, line 314, in clobber
ensure_dir(destdir)
File “/usr/local/lib/python2.7/dist-packages/pip/utils/init.py”, line 82, in ensure_dir
os.makedirs(path)
File “/usr/lib/python2.7/os.py”, line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 28] No space left on device: ‘/usr/local/lib/python2.7/dist-packages/Mopidy_Spotify-2.2.0.dist-info’

and for pip install Mopidy-Moped :

pip install Mopidy-Moped
Collecting Mopidy-Moped
/usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see Advanced Usage - urllib3 2.1.0 documentation.
SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see Advanced Usage - urllib3 2.1.0 documentation.
InsecurePlatformWarning
Using cached Mopidy-Moped-0.6.4.tar.gz
Could not import setuptools which is required to install from a source distribution.
Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py”, line 375, in setup_py
import setuptools # noqa
File “/usr/local/lib/python2.7/dist-packages/setuptools/init.py”, line 11, in
from setuptools.extern.six.moves import filterfalse, map
File “/usr/local/lib/python2.7/dist-packages/setuptools/extern/init.py”, line 1, in
from pkg_resources.extern import VendorImporter
ImportError: No module named extern

I don’t create virtualenv, I only installed mopidy with debian version (no dev)

Thanks

Your disk is full. Get some free space, then try reinstalling it all, in case something was partially installed.

Thanks Jodal,

I installed all my services : moped and spotify, no problem that works.
But since I installed my extension (python setup.py develop), mopidy start no problem but now, Mopidy doesn’t find my web extenstions, the website IP:6680/mopidy there are nothing.

And when I go to IP:6680/moped : 404: Not Found

I don’t understand why. On my mac, that work (but with virtualenv, is that ?)

Edit :

I installed virtualenv and that work, why do I must use virtualenv ?

Thanks,
Have a nice day