mopidy / mopidy-local-sqlite

DEPRECATED (Mopidy SQLite local library extension)
https://mopidy.com
Apache License 2.0
30 stars 10 forks source link

ImportError: No module named utils #85

Closed Patresss closed 7 years ago

Patresss commented 7 years ago

Hi, I have a problem with sudo mopidy local scan


INFO     Starting Mopidy 2.1.0
INFO     Loading config from builtin defaults
INFO     Loading config from /home/patres/.config/mopidy/mopidy.conf
INFO     Loading config from command line options
INFO     Enabled extensions: mpd, http, moped, stream, m3u, softwaremixer, local-whoosh, file, local, local-sqlite
INFO     Disabled extensions: none
ERROR    Extension local-whoosh failed during setup, this might have left the registry in a bad state.
Traceback (most recent call last):
  File "/home/patres/.local/lib/python2.7/site-packages/mopidy/__main__.py", line 121, in main
    extension.setup(registry)
  File "/home/patres/.local/lib/python2.7/site-packages/mopidy_local_whoosh/__init__.py", line 26, in setup
    from .library import WhooshLibrary
  File "/home/patres/.local/lib/python2.7/site-packages/mopidy_local_whoosh/library.py", line 12, in <module>
    from mopidy.utils import path
ImportError: No module named utils
INFO     Found 0 files in media_dir.
INFO     Checking 0 tracks from library.
INFO     Removing 0 missing tracks.
INFO     Found 0 tracks which need to be updated.
INFO     Scanning...
INFO     Scanned 0 of 0 files in 0s.
INFO     Done scanning.

I installed like this:

sudo wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add - 
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/mopidy.list 
sudo apt-get update 
sudo apt-get install mopidy 
sudo /etc/init.d/mopidy restart
pip install Mopidy-Local-Whoosh 

My config file:

# For further information about options in this file see:
#   http://docs.mopidy.com/
#
# The initial commented out values reflect the defaults as of:
#   Mopidy 2.1.0
#   Mopidy-File 2.1.0
#   Mopidy-HTTP 2.1.0
#   Mopidy-Local 2.1.0
#   Mopidy-M3U 2.1.0
#   Mopidy-MPD 2.1.0
#   Mopidy-SoftwareMixer 2.1.0
#   Mopidy-Stream 2.1.0
#
# Available options and defaults might have changed since then,
# run `mopidy config` to see the current effective config and
# `mopidy --version` to check the current version.

[core]
cache_dir = $XDG_CACHE_DIR/mopidy
config_dir = $XDG_CONFIG_DIR/mopidy
data_dir = $XDG_DATA_DIR/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
color = true
console_format = %(levelname)-8s %(message)s
debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n  %(message)s
debug_file = mopidy.log
config_file =

[audio]
mixer = software
mixer_volume = 
output = autoaudiosink
buffer_time = 

[proxy]
scheme = 
hostname = 
port = 
username = 
password = 

[mpd]
enabled = true
hostname = 192.168.72.131
port = 6600
password = 
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist = 
  listall
  listallinfo
default_playlist_scheme = m3u

[http]
enabled = true
hostname = 192.168.72.131
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname

[stream]
enabled = true
protocols = 
  http
  https
  mms
  rtmp
  rtmps
  rtsp
metadata_blacklist = 
timeout = 5000

[m3u]
enabled = true
base_dir = $XDG_MUSIC_DIR
default_encoding = latin-1
default_extension = .m3u8
playlists_dir =

[softwaremixer]
enabled = true

[file]
enabled = true
media_dirs = 
  $XDG_MUSIC_DIR|Music
  ~/|Home
excluded_file_extensions = 
  .jpg
  .jpeg
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[local]
enabled = true
library = json
media_dir = $XDG_MUSIC_DIR
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions = 
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .png
  .txt

I tried install it in two virtual machine (Ubuntu 16) and I still have this same problem with scan

kingosticks commented 7 years ago

This is mopidy-local-sqlite, not Mopidy-Local-Whoosh. Plus your config says you are using the json local library (so neither whoosh or sqlite). Plus you probably want be using sudo mopidyctl local scan. This issue doesn't look like it belongs here.

Patresss commented 7 years ago

Thank You, sorry for my mistake. Happy Easter Egg!

kingosticks commented 7 years ago

No problem. Might be best to post at http://discuss.mopidy.com if you are still having usage/config issues.