eoan-ermine / e621-py

A feature-rich high-level e621 and e926 API wrapper.
MIT License
20 stars 4 forks source link

Import errors `NameError: name 'autogenerated' is not defined` #9

Open N8Deathrider opened 2 years ago

N8Deathrider commented 2 years ago

Just after running pip3 install e621 and then starting python, trying to import e621 (>>> import e621) errors out with the following error:

File "/home/username/.local/lib/python3.10/site-packages/e621/models.py", line 14, in <module>
    class Field720p(autogenerated.Field720p):
NameError: name 'autogenerated' is not defined

I attempted to try and fix the issue myself by changing line 8 in e621/models.py to

from . import autogenerated_models as autogenerated

which wasn't the simple fix I was hoping for. Fixing the new errors that came from that just starts to lead down a rabbit hole so I figured, before I keep going trying to fix all of this, am I just doing something wrong?

Hmiku8338 commented 2 years ago

Hi. We're going to fix this in the next version that is going to come out very soon. Thank you for opening this issue.

ghost commented 2 years ago

I'm also having this problem. Thank you so much for working on this, do you have an ETA on when the fix will be released @Hmiku8338? Really appreciate the project, and it's nice to see it being actively maintained!

Hmiku8338 commented 2 years ago

@NotCoolKiwi @N8Deathrider

Thank you guys for your kind words and interest in the project! If you wish to help it grow and contribute some of your code, just ping me anywhere, and I can create a few improvement-issues on the subsequent pages of both e621-stable and e621-dl. I have put a lot of time into this project so it's nice to see so much interest.

Long story short: I suggest switching to my fork of this repo for now: https://github.com/Hmiku8338/e621 which is installable from pypi using e621-stable name and has the fix for this bug.

The long story:

I am not going to close this issue because my comment doesn't solve the problem of e621 package per se.

ghost commented 2 years ago

@Hmiku8338,

Thank you so much for the fast reply and your contributions to the project. I really appreciate it!

ghost commented 1 year ago

Hey, I realized that 0.0.6 is fine so you can use pip install e621==0.0.6 and you will still be fine

ghost commented 1 year ago

Also @Hmiku8338, e621-stable has the same problem.