Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
N8Deathrider opened this issue Sep 21, 2022 · 6 comments
Open

Comments

@N8Deathrider
Copy link

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
Copy link
Collaborator

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
Copy link

ghost commented Nov 7, 2022

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
Copy link
Collaborator

Hmiku8338 commented Nov 7, 2022

@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:

  • This project has been originally very different in its nature. I proposed to re-make it using my work from https://github.com/Hmiku8338/e621-dl project and @PatriotRossii agreed
  • After re-making it and finalizing my work on it, I stepped away from the project for quite a while
  • Sadly, during this time @PatriotRossii has accidentally published a completely broken release to PyPi that doesn't even have a copy on github which caused this terrible bug.
  • @PatriotRossii has been incredibly busy recently due to his work and education taking the majority of his time so he was not able to fix it for a while.
  • After seeing this issue, I decided to continue maintaining this project in a separate repository and PyPi package where I will prevent any broken releases and rigorously follow semantic versioning. I suggest you guys switch to using that package. No worries about the quality of my fork -- I am the author of 99% of code in this repo as well so the ideals of the project are not likely to change.

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

@ghost
Copy link

ghost commented Nov 7, 2022

@Hmiku8338,

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

@ghost
Copy link

ghost commented May 8, 2023

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
Copy link

ghost commented May 9, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants