sioyek-python-extensions
sioyek-python-extensions copied to clipboard
Python wrapper error: cannot import name 'Sioyek' from 'sioyek'
I've recently installed the Python wrapper through pip install sioyek --user on Arch Linux.
When I run my Python script (either from the terminal or from Sioyek) that includes the line from sioyek import Sioyek, clean_path, I receive the following error:
Traceback (most recent call last):
File "/home/maxigaz/.config/sioyek/scripts/search_and_jump.py", line 2, in <module>
from sioyek import Sioyek, clean_path
ImportError: cannot import name 'Sioyek' from 'sioyek' (/home/maxigaz/.local/lib/python3.11/site-packages/sioyek/__init__.py)
I looked at the referenced __init__.py file, and it exists... although it is completely empty and has a size of 0B.
Because of the way this project is structured, if you want to import the Sioyek class, you'd want to import it like from [package].[file its defined in] import Sioyek. In this case it would then be from sioyek.sioyek import Sioyek.
from sioyek.sioyek import Sioyek works. Thank you!
I copied what I tried originally, from sioyek import Sioyek, clean_path, from the documentation.