t-wissmann / barpyrus

A python wrapper for lemonbar
Other
33 stars 7 forks source link

barpyrus does not start anymore on Arch #17

Closed apm256 closed 3 years ago

apm256 commented 3 years ago

After an update on Arch Linux, and a subsequent re-install of barpyrus, barpyrus does not start anymore:

$ barpyrus 
Traceback (most recent call last):
  File "/usr/bin/barpyrus", line 33, in <module>
    sys.exit(load_entry_point('barpyrus==0.0.0', 'console_scripts', 'barpyrus')())
  File "/usr/bin/barpyrus", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'barpyrus'

Any help would be appreciated!

apm256 commented 3 years ago

it's probably something related to the AUR package, as using the barpyrus.py script (by cloning this repos) works. So I close this issue, as it it is probably not the right place to ask!

t-wissmann commented 3 years ago

Sorry for not reacting yet; I'm busy for a while. Maybe the issue is related to the setup.py. The backtrace looks as if this load_entry_point(...) is derived from setup.py; but unfortunately, I'm not really experienced with setup.py and usually just call barpyrus.py from my git clone.

The-Compiler commented 3 years ago

Are you sure you reinstalled barpyrus and rebuilt the package (not using the cached one)? I usually see this happen when there's a Python upgrade in Arch (like there was in November), but AUR packages aren't properly rebuilt. You should have a /usr/lib/python3.9/site-packages/barpyrus/ but I suspect you'll still have a /usr/lib/python3.8/site-packages/barpyrus/ instead

apm256 commented 3 years ago

Thanks for your answer. Yes, I tried to rebuild the package several times, both with yaourt and makepkg.

I checked the python3.9 dir, and it seems ok for me:

$ ls -d /usr/lib/python3.9/site-packages/barpyrus-0.0.0-py3.9.egg-info/
/usr/lib/python3.9/site-packages/barpyrus-0.0.0-py3.9.egg-info

qutebrower, after a rebuild, works fine, for instance :-)

The-Compiler commented 3 years ago

Do you also have a barpyrus folder there (not the *.egg-info)? What do which python3 and python3 -c "import barpyrus; print(barpyrus.__file__)" say? Also, what's the shebang (i.e. the first line) in /usr/bin/barpyrus?

apm256 commented 3 years ago

Do you also have a barpyrus folder there (not the *.egg-info)?

No! and this is probably not normal!

$ find /usr/lib/python* -name "*barpyrus*"
/usr/lib/python3.9/site-packages/barpyrus-0.0.0-py3.9.egg-info

What do which python3 and python3 -c "import barpyrus; print(barpyrus.__file__)" say? Also, what's the shebang (i.e. the first line) in /usr/bin/barpyrus?

$ which python3
/usr/bin/python3
$ python3 -c "import barpyrus; print(barpyrus.__file__)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'barpyrus'
$ head -n1 /usr/bin/barpyrus 
#!/usr/bin/python
$ /usr/bin/python --version
Python 3.9.1
The-Compiler commented 3 years ago

Well, this is embarrassing... I wanted to separate the building/packaging in https://aur.archlinux.org/cgit/aur.git/commit/?h=barpyrus-git&id=fa0cefbba0b67ef659276300be5fb04a1062cc7b but apparently forgot to actually include building...

Fixed in https://aur.archlinux.org/cgit/aur.git/commit/?h=barpyrus-git&id=dde299fa2836a6bb8aa6ba80bcd30b830a4d283f now, so I think this can be closed again.

t-wissmann commented 3 years ago

Thanks for fixing and for taking care of the aur package @The-Compiler :-)

apm256 commented 3 years ago

Thanks!