Error running from source

#1
beet -vv imp "my test"
user configuration: C:\Users\arogl\AppData\Roaming\beets\config.yaml
data directory: C:\Users\arogl\AppData\Roaming\beets
plugin paths: C:\Users\arogl\AppData\Roaming\beets\beetsplug
Sending event: pluginload
Traceback (most recent call last):
  File "C:\Python36\Scripts\beet-script.py", line 11, in <module>
    load_entry_point('beets==1.4.8', 'console_scripts', 'beet')()
  File "C:\Python36\lib\site-packages\beets-1.4.8-py3.6.egg\beets\ui\__init__.py", line 1266, in main
  File "C:\Python36\lib\site-packages\beets-1.4.8-py3.6.egg\beets\ui\__init__.py", line 1249, in _raw_main
  File "C:\Python36\lib\site-packages\beets-1.4.8-py3.6.egg\beets\ui\__init__.py", line 1135, in _setup
  File "C:\Python36\lib\site-packages\beets-1.4.8-py3.6.egg\beets\ui\__init__.py", line 1121, in _load_plugins
  File "C:\Python36\lib\site-packages\beets-1.4.8-py3.6.egg\beets\plugins.py", line 488, in send
  File "C:\Python36\lib\site-packages\beets-1.4.8-py3.6.egg\beets\plugins.py", line 471, in event_handlers
  File "C:\Python36\lib\site-packages\beets-1.4.8-py3.6.egg\beets\plugins.py", line 307, in find_plugins
  File "C:\Python36\lib\site-packages\beets-1.4.8-py3.6.egg\beetsplug\lastgenre\__init__.py", line 116, in __init__
  File "C:\Python36\lib\site-packages\beets-1.4.8-py3.6.egg\beetsplug\lastgenre\__init__.py", line 133, in setup
FileNotFoundError: [Errno 2] No such file or directory: b'C:\\Python36\\lib\\site-packages\\beets-1.4.8-py3.6.egg\\beetsplug\\lastgenre\\genres.txt'

$ beet -v imp "my test"
user configuration: C:\Users\arogl\AppData\Roaming\beets\config.yaml
data directory: C:\Users\arogl\AppData\Roaming\beets
plugin paths: C:\Users\arogl\AppData\Roaming\beets\beetsplug
C:\Python36\lib\site-packages\requests\__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.2) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
Sending event: pluginload
configuration error: import.delete not found

$ beet imp "my test"
configuration error: verbose not found

I am running win10 latest version Python 3.6_x64 I had beets working, ran a git pull then ran python -m setup.py install in the beets directory then stated getting the above errors.

I have deleted and re-cloned beets but get the same errors…

The missing file is in the “.egg” file.

Any other suggestions?

#2

Sorry you didn’t get a response on gitter!

It’s possible that there’s some sort of path encoding issue affecting Windows that’s preventing the path to the genre.txt file from working as expected. Does that file actually exist if you navigate to the directory it’s trying to use (C:\Python36\lib\site-packages\beets-1.4.8-py3.6.egg\beetsplug\lastgenre\genres.txt)?

Those configuration errors also look suspicious. Could you share what’s in your config file? It also looks like you perhaps didn’t install beets’ dependencies properly, since that RequestsDependencyWarning seems to be saying you have some sort of dependency conflict.

#3

I have uninstalled python, installed 3.7.3 then ran the setup form my git clone and get the same error minus the RequestsDependencyWarning

 beet ls -p added:2019-04
configuration error: verbose not found

arogl@MSI-GE62 H:\
$ beet -v ls -p added:2019-04
user configuration: C:\Users\arogl\AppData\Roaming\beets\config.yaml
data directory: C:\Users\arogl\AppData\Roaming\beets
plugin paths: C:\Users\arogl\AppData\Roaming\beets\beetsplug
Sending event: pluginload
Traceback (most recent call last):
  File "C:\Python37\Scripts\beet-script.py", line 11, in <module>
    load_entry_point('beets==1.4.8', 'console_scripts', 'beet')()
  File "C:\Python37\lib\site-packages\beets-1.4.8-py3.7.egg\beets\ui\__init__.py", line 1266, in main
  File "C:\Python37\lib\site-packages\beets-1.4.8-py3.7.egg\beets\ui\__init__.py", line 1249, in _raw_main
  File "C:\Python37\lib\site-packages\beets-1.4.8-py3.7.egg\beets\ui\__init__.py", line 1135, in _setup
  File "C:\Python37\lib\site-packages\beets-1.4.8-py3.7.egg\beets\ui\__init__.py", line 1121, in _load_plugins
  File "C:\Python37\lib\site-packages\beets-1.4.8-py3.7.egg\beets\plugins.py", line 488, in send
  File "C:\Python37\lib\site-packages\beets-1.4.8-py3.7.egg\beets\plugins.py", line 471, in event_handlers
  File "C:\Python37\lib\site-packages\beets-1.4.8-py3.7.egg\beets\plugins.py", line 307, in find_plugins
  File "C:\Python37\lib\site-packages\beets-1.4.8-py3.7.egg\beetsplug\lastgenre\__init__.py", line 116, in __init__
  File "C:\Python37\lib\site-packages\beets-1.4.8-py3.7.egg\beetsplug\lastgenre\__init__.py", line 133, in setup
FileNotFoundError: [Errno 2] No such file or directory: b'C:\\Python37\\lib\\site-packages\\beets-1.4.8-py3.7.egg\\beetsplug\\lastgenre\\genres.txt'

arogl@MSI-GE62 H:\
$ beet -vv ls -p added:2019-04
user configuration: C:\Users\arogl\AppData\Roaming\beets\config.yaml
data directory: C:\Users\arogl\AppData\Roaming\beets
plugin paths: C:\Users\arogl\AppData\Roaming\beets\beetsplug
Sending event: pluginload
configuration error: import.delete not found

the .egg fille is a .zip file that I can read and tests ok.

7z l C:\\Python37\\lib\\site-packages\beets-1.4.8-py3.7.egg

7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21

Scanning the drive for archives:
1 file, 496465 bytes (485 KiB)

Listing archive: C:\\Python37\\lib\\site-packages\beets-1.4.8-py3.7.egg

--
Path = C:\\Python37\\lib\\site-packages\beets-1.4.8-py3.7.egg
Type = zip
Physical Size = 496465

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2019-05-09 17:41:12 .....         6720         2161  EGG-INFO\PKG-INFO
2019-05-09 17:41:12 .....         7981         1892  EGG-INFO\SOURCES.txt
2019-05-09 17:41:12 .....            1            3  EGG-INFO\dependency_links.txt
2019-05-09 17:41:12 .....           40           39  EGG-INFO\entry_points.txt
2019-05-09 17:41:12 .....          613          332  EGG-INFO\requires.txt
2019-05-09 17:41:12 .....           16           15  EGG-INFO\top_level.txt
2019-05-09 17:41:14 .....            2            4  EGG-INFO\zip-safe
2019-05-05 16:54:14 .....         1467          727  beets\__init__.py
2019-05-05 16:54:14 .....          940          520  beets\__main__.py
2019-05-05 16:54:14 .....         8034         2539  beets\art.py
2019-05-05 16:54:14 .....         3056         1232  beets\config_default.yaml
2019-05-05 16:54:14 .....        62422        16080  beets\importer.py
2019-05-05 16:54:14 .....        57169        14849  beets\library.py
2019-05-05 16:54:14 .....         4477         1759  beets\logging.py
2019-05-05 16:54:14 .....        73581        17102  beets\mediafile.py
2019-05-05 16:54:14 .....        19489         5529  beets\plugins.py
2019-05-05 16:54:14 .....         3880         1585  beets\random.py
2019-05-05 16:54:14 .....         1892          901  beets\vfs.py
2019-05-05 16:54:14 .....         6958         1988  beets\autotag\__init__.py
2019-05-05 16:54:14 .....        23337         6587  beets\autotag\hooks.py
2019-05-05 16:54:14 .....        20180         5827  beets\autotag\match.py
2019-05-05 16:54:14 .....        18903         5374  beets\autotag\mb.py
2019-05-05 16:54:14 .....         1158          589  beets\dbcore\__init__.py
2019-05-05 16:54:14 .....        36773        10030  beets\dbcore\db.py
2019-05-05 16:54:14 .....        30311         7848  beets\dbcore\query.py
2019-05-05 16:54:14 .....        10028         3415  beets\dbcore\queryparse.py
2019-05-05 16:54:14 .....         6633         2338  beets\dbcore\types.py
2019-05-05 16:54:14 .....        44807        13478  beets\ui\__init__.py
2019-05-05 16:54:14 .....        63637        16544  beets\ui\commands.py
2019-05-05 16:54:14 .....         4616         1755  beets\ui\completion_base.sh
2019-05-05 16:54:14 .....        35783        11179  beets\util\__init__.py
2019-05-05 16:54:14 .....         9549         3210  beets\util\artresizer.py
2019-05-05 16:54:14 .....        20471         5419  beets\util\bluelet.py
2019-05-05 16:54:14 .....        52724        13510  beets\util\confit.py
2019-05-05 16:54:14 .....         1502          574  beets\util\enumeration.py
2019-05-05 16:54:14 .....        21919         5947  beets\util\functemplate.py
2019-05-05 16:54:14 .....         2910         1148  beets\util\hidden.py
2019-05-05 16:54:14 .....        17146         4747  beets\util\pipeline.py
2019-05-05 16:54:14 .....          913          491  beetsplug\__init__.py
2019-05-05 16:54:14 .....         6233         2234  beetsplug\absubmit.py
2019-05-05 16:54:14 .....        12188         3542  beetsplug\acousticbrainz.py
2019-05-05 16:54:14 .....         5950         2034  beetsplug\badfiles.py
2019-05-05 16:54:14 .....        18869         5159  beetsplug\beatport.py
2019-05-05 16:54:14 .....         4309         1445  beetsplug\bench.py
2019-05-05 16:54:14 .....         2878         1198  beetsplug\bpm.py
2019-05-05 16:54:14 .....         8424         2714  beetsplug\bucket.py
2019-05-05 16:54:14 .....        12325         3878  beetsplug\chroma.py
2019-05-05 16:54:14 .....        19747         5423  beetsplug\convert.py
2019-05-05 16:54:14 .....         1955          857  beetsplug\cue.py
2019-05-05 16:54:14 .....        25420         7313  beetsplug\discogs.py
2019-05-05 16:54:14 .....        13571         3588  beetsplug\duplicates.py
2019-05-05 16:54:14 .....        14654         4707  beetsplug\edit.py
2019-05-05 16:54:14 .....         7689         2259  beetsplug\embedart.py
2019-05-05 16:54:14 .....         6208         1959  beetsplug\embyupdate.py
2019-05-05 16:54:14 .....         4868         1729  beetsplug\export.py
2019-05-05 16:54:14 .....        38427        10332  beetsplug\fetchart.py
2019-05-05 16:54:14 .....         3111         1109  beetsplug\filefilter.py
2019-05-05 16:54:14 .....         1505          729  beetsplug\freedesktop.py
2019-05-05 16:54:14 .....         5539         2100  beetsplug\fromfilename.py
2019-05-05 16:54:14 .....         6341         2183  beetsplug\ftintitle.py
2019-05-05 16:54:14 .....         1619          769  beetsplug\fuzzy.py
2019-05-05 16:54:14 .....         5259         1743  beetsplug\gmusic.py
2019-05-05 16:54:14 .....         4162         1472  beetsplug\hook.py
2019-05-05 16:54:14 .....         3096         1207  beetsplug\ihate.py
2019-05-05 16:54:14 .....         5854         1517  beetsplug\importadded.py
2019-05-05 16:54:14 .....         4636         1643  beetsplug\importfeeds.py
2019-05-05 16:54:14 .....         7760         2593  beetsplug\info.py
2019-05-05 16:54:14 .....         4469         1599  beetsplug\inline.py
2019-05-05 16:54:14 .....        10652         2808  beetsplug\ipfs.py
2019-05-05 16:54:14 .....         3065         1219  beetsplug\keyfinder.py
2019-05-05 16:54:14 .....         3259         1352  beetsplug\kodiupdate.py
2019-05-05 16:54:14 .....         8864         2916  beetsplug\lastimport.py
2019-05-05 16:54:14 .....         1652          780  beetsplug\loadext.py
2019-05-05 16:54:14 .....        32637        10079  beetsplug\lyrics.py
2019-05-05 16:54:14 .....         6469         2065  beetsplug\mbcollection.py
2019-05-05 16:54:14 .....         2279         1008  beetsplug\mbsubmit.py
2019-05-05 16:54:14 .....         8100         2313  beetsplug\mbsync.py
2019-05-05 16:54:14 .....         8350         2552  beetsplug\missing.py
2019-05-05 16:54:14 .....        11993         3626  beetsplug\mpdstats.py
2019-05-05 16:54:14 .....         4401         1645  beetsplug\mpdupdate.py
2019-05-05 16:54:14 .....         4242         1364  beetsplug\permissions.py
2019-05-05 16:54:14 .....         8036         2592  beetsplug\play.py
2019-05-05 16:54:14 .....         6835         2003  beetsplug\playlist.py
2019-05-05 16:54:14 .....         3027         1121  beetsplug\plexupdate.py
2019-05-05 16:54:14 .....         2115          925  beetsplug\random.py
2019-05-05 16:54:14 .....        40788         9887  beetsplug\replaygain.py
2019-05-05 16:54:14 .....         2935         1186  beetsplug\rewrite.py
2019-05-05 16:54:14 .....         5536         1984  beetsplug\scrub.py
2019-05-05 16:54:14 .....         8431         2537  beetsplug\smartplaylist.py
2019-05-05 16:54:14 .....         1763          814  beetsplug\sonosupdate.py
2019-05-05 16:54:14 .....        22935         5826  beetsplug\spotify.py
2019-05-05 16:54:14 .....         3187         1380  beetsplug\subsonicupdate.py
2019-05-05 16:54:14 .....         3360         1258  beetsplug\the.py
2019-05-05 16:54:14 .....        10731         3424  beetsplug\thumbnails.py
2019-05-05 16:54:14 .....         1783          745  beetsplug\types.py
2019-05-05 16:54:14 .....         5984         2069  beetsplug\zero.py
2019-05-05 16:54:14 .....        58661        14709  beetsplug\bpd\__init__.py
2019-05-05 16:54:14 .....        10283         3517  beetsplug\bpd\gstplayer.py
2019-05-05 16:54:14 .....        17348         4989  beetsplug\lastgenre\__init__.py
2019-05-05 16:54:14 .....        15952         4320  beetsplug\lastgenre\genres-tree.yaml
2019-05-05 16:54:14 .....        18697         7454  beetsplug\lastgenre\genres.txt
2019-05-05 16:54:14 .....         4578         1692  beetsplug\metasync\__init__.py
2019-05-05 16:54:14 .....         4229         1477  beetsplug\metasync\amarok.py
2019-05-05 16:54:14 .....         4720         1820  beetsplug\metasync\itunes.py
2019-05-05 16:54:14 .....        13379         4160  beetsplug\web\__init__.py
2019-05-05 16:54:14 .....        43749        12065  beetsplug\web\static\backbone.js
2019-05-05 16:54:14 .....         3111          908  beetsplug\web\static\beets.css
2019-05-05 16:54:14 .....         9172         2527  beetsplug\web\static\beets.js
2019-05-05 16:54:14 .....       257501        73172  beetsplug\web\static\jquery.js
2019-05-05 16:54:14 .....        35475         9689  beetsplug\web\static\underscore.js
2019-05-05 16:54:14 .....         3404          876  beetsplug\web\templates\index.html
------------------- ----- ------------ ------------  ------------------------
2019-05-09 17:41:14            1672772       483155  111 files

arogl@MSI-GE62 H:\
$ 7z t C:\\Python37\\lib\\site-packages\beets-1.4.8-py3.7.egg

7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21

Scanning the drive for archives:
1 file, 496465 bytes (485 KiB)

Testing archive: C:\\Python37\\lib\\site-packages\beets-1.4.8-py3.7.egg
--
Path = C:\\Python37\\lib\\site-packages\beets-1.4.8-py3.7.egg
Type = zip
Physical Size = 496465

Everything is Ok

Files: 111
Size:       1672772
Compressed: 496465

Config file"

directory: \\?\I:\Music
import:
    copy: no
    move: yes
    write: yes
    resume: ask
    quiet_fallback: skip
    timid: no
    log: H:\new_Music\beetslog.txt
    languages: en

ignore: .AppleDouble ._* *~ .DS_Store *.sfv *.srr *.nfo *.m3u *.ini *.log *.nfo

art_filename: cover

pluginpath:
    C:\Users\arogl\AppData\Roaming\beets\beetsplug

plugins: chroma discogs lastgenre acousticbrainz mbsync fetchart embedart replaygain duplicates missing info scrub zero fromfilename ftintitle importadded lyrics badfiles absubmit artistcountry arttools bandcamp beatport
# convert follow wlg check beatport bandcamp copyartifacts #### dates moveall gracenote barcode

replace:
    '[\\/]': ''
    '[\x00-\x1f]': ''
    '[<>:\"\?\*\|]': ''
    "\u2010": '-'
    "\u2011": '-'
    "\u2012": '-'
    "\u2013": '-'
    "\u2014": '-'
    "\u2015": '-'
    "\u2016": "'"
    "\u2018": "'"
    "\u2019": "'"
    "\u201A": ','
    "\u201B": "'"
    "\u201C": "'"
    "\u201D": "'"
    "\u201E": "'"
    "\u201F": "'"
    "\u2026": '...'
    '^\.\.\.': ''
    '^\.\.': ''
    '^\.': ''
    '\.\.\.$': ''
    '\.\.$': ''
    '\.$': ''
    '\s+$': ''
    '^\s+': ''
    '^-': ''
    "`": "'"
    "Florence And The Machine": "Florence + The Machine"
    "Marina & The Diamonds": "MARINA"
    "Marina and The Diamonds": "MARINA"

threaded: yes
#threaded: no
va_name: "Various Artists"
id3v23: no

time_format: '%Y-%m-%d %H:%M:%S'
format_raw_length: no

sort_album: albumartist+ album+
sort_item: artist+ album+ disc+ track+
sort_case_insensitive: yes

# max_filename_length: 80

ui:
    color: yes
    colors:
        text_success: green
        text_warning: yellow
        text_error: red
        text_highlight: red
        text_highlight_minor: lightgray
        action_default: turquoise
        action: yellow

format_item: "\u001b[92m$artist\u001b[39m - \u001b[31m$album\u001b[39m - \u001b[93m$title\u001b[39m"
format_album: "\u001b[92m$albumartist\u001b[39m - \u001b[31m$album\u001b[39m"

paths:
    default: %upper{%left{$albumartist,1}}/$albumartist/($year) $album%aunique{}/$album - $track - $artist - $title
    singleton: Singles/$artist - $title
    albumartist:\“Weird Al\” Yankovic: W/Weird Al Yankovic/($year) $album%aunique{}/$album - $track - $artist - $title
    albumtype:soundtrack: Soundtracks/($year) $album%aunique{}/$album - $track - $artist - $title
    albumartist:various\ artists: Various Artists/($year) $album%aunique{}/$album - $track - $artist - $title
    albumartist:various: Various Artists/($year) $album%aunique{}/$album - $track - $artist - $title
    comp: Various Artists/($year) $album%aunique{}/$album - $track - $artist - $title
    genre:8-Bit: 8-Bit/$albumartist/($year) $album%aunique{}/$album - $track - $artist - $title
    genre:chiptune: 8-Bit/$albumartist/($year) $album%aunique{}/$album - $track - $artist - $title
    genre:idm: 8-Bit/$albumartist/($year) $album%aunique{}/$album - $track - $artist - $title
    ext:pdf: %upper{%left{$albumartist,1}}/$albumartist/($year) $album%aunique{}/$album - 00 - $artist - $title

zero:
    fields: comments
    comments: [EAC, LAME, from.+collection, 'ripped by', ExactAudioCopy, 'Exact Audio Copy', 'www.tr7music.me', 'WWW.ITUNESCLUB.COM', 'itunesvn.com', 'http://mzmusiczone.blogspot.com/']
    update_database: true

scrub:
    auto: yes

replaygain:
    overwrite: no
    auto: yes
    backend: bs1770gain
#    backend: gstreamer
#    command: c:\agrbin\aacgain.exe

embedart:
    auto: yes

fetchart:
    auto: yes
    cautious: yes
    cover_names: cover front art album folder
    google_search: yes
    minwidth: 0
    enforce_ratio: no
    sources: filesystem coverart itunes albumart amazon fanarttv wikipedia google
    fanarttv_key: **redacted**
    google_API_key: **redacted**
    google_engine_ID: **redacted**

acoustid:
    apikey: **redacted**

#convert:
#    ffmpeg: c:\agrbin\bin\ffmpeg.exe
#    embed: true
#    format: mp3
#    max_bitrate: 192
#    dest: %upper{%left{$albumartist,1}}/$artist/($year) $album%aunique{}/$album - $track - $artist - $title
#    threads: 4
#    paths:
#        default: %upper{%left{$artist,1}}/$albumartist/($year) $album%aunique{}/$album - $track - $artist - $title

copyartifacts:
    extensions: .pdf
    print_ignored: yes

check:
  import: yes
  write-check: yes
  write-update: yes
  convert-update: yes
  threads: 8
  tools:
    mp3val:
      cmd: 'mp3val {}'
      formats: MP3
      error: '^WARNING: .* \(offset 0x[0-9a-f]+\): (.*)$'
      fix: 'mp3val -f -nb {}'
    flac:
      cmd: 'flac --test {}'
      formats: flac

duplicates:
    album: no
    checksum: ffmpeg -i {file} -f crc -
    copy: none
    count: no
    delete: no
    format: $album - $track - $artist - $title
    full: no
    strict: no
    keys: [mb_trackid, mb_albumid]
    move: none
    path: no
#    tag: no

match:
    ignore_video_tracks: no
    distance_weights:
        barcode: 1.0
importadded:
    preserve_mtimes: yes

lyrics:
  fallback: ''
  sources: musixmatch lyrics.com lyricwiki google
  google_API_key: **redacted**
  google_engine_ID: **redacted**

ftintitle:
  auto: yes
  drop: no
  format: feat. {0}

#follow:
#    email: **redacted**
#    password: **redacted**
#    userid: **redacted**
#    auto: yes

wlg:
    auto: yes
    force: no
    count: 4
    separator: ', '
    whitelist: beets

bandcamp:
    art: true
    lyrics: true

badfiles:
  commands:
    flac: flac --test --warnings-as-errors --silent

acousticbrainz:
  auto: yes

lastgenre:
  auto: yes
  count: 3
  canonical: yes

musicbrainz:
    host: musicbrainz.org
    ratelimit: 1
    ratelimit_interval: 1.0
    searchlimit: 5

absubmit:
    auto: yes
    extractor: D:\win_prog\acousticbrainz-gui\streaming_extractor_music.exe

dates:
    prefix: '='

I tried disabling all plugins with the same error output.

OK about gitter.

#4

Trying to debug, once in ui_init_.py it jumps straight to line 1282 sys.exit(1)

except confit.ConfigError as exc:
        log.error(u'configuration error: {0}', exc)
        sys.exit(1)

Even “beet help” gives the same errors.

Uninstalled beets and tested the following:

pip install beets - works
pip install https://github.com/beetbox/beets/tarball/master - works
pip install -e git+https://github.com/beetbox/beets#egg=beets - works
python setup.py install - fails from a git clone or from the same directory as  "pip install -e git+https://github.com/beetbox/beets#egg=beets"

pip is up to date, installed packages

$ pip freeze
audioread==2.1.6
beautifulsoup4==4.7.1
beets==1.4.8
bs4==0.0.1
certifi==2019.3.9
cffi==1.12.3
chardet==3.0.4
Chroma==0.2.0
colorama==0.4.1
colorlog==4.0.2
confuse==0.5.0
discogs-client==2.2.2
fancycompleter==0.8
idna==2.8
isodate==0.6.0
jellyfish==0.7.1
munkres==1.1.2
musicbrainzngs==0.6
mutagen==1.42.0
oauthlib==3.0.1
packaging==19.0
pdbpp==0.10.0
Pillow==6.0.0
pip-review==1.0
pyacoustid==1.1.5
pycparser==2.19
Pygments==2.4.0
pylast==3.1.0
pyparsing==2.4.0
pyreadline==2.1
pyyaml==5.1
requests==2.21.0
requests-oauthlib==1.2.0
six==1.12.0
soupsieve==1.9.1
unidecode==1.0.23
urllib3==1.24.3
winpdb-reborn==2.0.0.dev5
wmctrl==0.3
wxPython==4.0.4
youtube-dl==2019.4.30

Anything else I can try?

#5

Hi! I’m not exactly sure what happened, but it really looks like your beets installation is incomplete. I would try to delete it all and reinstall. It may also be the case that you have multiple installations of beets on your system in various states of completeness—if you can, try to manually delete all those beets directories from your site-packages, etc., to make sure everything’s gone. Then use pip install -e as you did before.

#6

All installs from source work, except if I run the setup from the git directory, whether that be from a manual git clone or using the pip -e git command.

In my testsing I did a pip uninstall and then manaually deleted any other files.

The following command always fails with the current source.

python setup.py install 

I am not sure what is run differently between a

pip install -e git+https://github.com/beetbox/beets#egg=beets

and

python setup.py install

Looking through the output from either install, no errors show up.

#7

Something still looks a bit suspicious with your Python modules. From your original post:

but from your pip freeze output:

The requests version you’re picking up has a dependency on 'urllib3>=1.21.1,<1.25' and it’s warning that it isn’t satisfied at runtime since the urllib3 version you have is too new (1.25.2 >= 1.25). The version isn’t too new in your pip freeze output though (1.24.3 < 1.25), so that means that at runtime it must be picking up a different package from somewhere.

Somehow when you run pip you’re not running in the same Python environment (some combination of PYTHONPATH, interpreter version and/or site.py) as when you’re running beets.

To investigate it you’ll have to be really careful about which environments you’re running in. For example instead of executing beets directly (which would be picking up an interpreter from the #! line) you could try python ./beet to make sure you’re getting the interpreter currently setup in your shell. If that works it could give you a hint about what’s wrong. It’s unlikely we’ll be able to help much more however since this looks like a problem on your system rather than something wrong with beets itself.

#8

I am now runnnig python 3.7.3 so that warning has been removed.

I have 2 python environements 2.7 and 3.7.
Beets is definitely installed in 3.7.

As I said the error seems to be from manually running the setup.py install

#9

I’ve had a play around with this myself and I think I understand what’s happening. Beets includes a few data files or “resources” (in particular beets/config_default.yaml and beetsplug/lastgenre/genres.txt) that it normally accesses by assuming that the files are installed alongside the python module with lines like these:

WHITELIST = os.path.join(os.path.dirname(__file__), 'genres.txt')
C14N_TREE = os.path.join(os.path.dirname(__file__), 'genres-tree.yaml')
DEFAULT_FILENAME = 'config_default.yaml'
filename = os.path.join(self._package_path, DEFAULT_FILENAME)
open(filename).read()

The problem is that you’re installing beets as an egg (which isn’t how we normally recommend), and in that scenario the whole beets module and all its data files remain packed in a zipfile, so the above logic fails. The ConfigErrors are because beets isn’t able to read the default_config.yaml file so confit doesn’t have default values for anything.

If we want to support running beets as an egg then we need to change how we access package resources to look more like:

from pkg_resources import resource_string
foo_config = resource_string(__name__, 'foo.conf')

Would you mind opening a bug for this?

1 Like
#10

Any reason why

python setup.py install

would now swap to an egg file, rather than a directory?

Happy to change to a pip install -e install

#11

I’ve opened an issue to look into this. For now since it seems that beets doesn’t work properly when installed as an egg, I would just stick to pip install -e.

#12

Thanks. I’ll follow the issue, trying to work through what changed the install from directory to egg file.