-
Notifications
You must be signed in to change notification settings - Fork 1
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
TypeError: unsupported operand type(s) for 'in': 'int' and 'EnumType' #1
Comments
Oh, hello! Thanks for the report, sorry I didn't notice it until today! So, it turns out that that bit of code is relying on something that doesn't work until Python 3.12! That's unintentional; I'll figure out a way to work around it. My main desktop's been using 3.12 so I didn't even realize I was doing something that required such a newer version. The minimum-version target that I'd been hoping for is 3.10. Anyway, in the meantime, if it's feasible to update to Python 3.12, that should fix you up, but I'll hope to have a fix in place within the hour, so hang tight. (I too am running Linux and run Animal Well via Wine/Proton, btw, so we've got similar environments in that regard. Cheers!) Sample code that triggers the same error (works in 3.12 but not 3.11): import enum
class Foo(enum.Enum):
ONE = 1
TWO = 2
THREE = 3
if 2 in Foo:
print('yo!') ... and also for my own reference, the issue where this functionality was added: python/cpython#88123 |
Turns out the old implementation here relied on a feature added in Python 3.12. Converting that to a version that will work on older Pythons, too. This fixes bug #1. See: python/cpython#88123
Okay, easy enough fix there. I believe this should work properly on Pythons as old as 3.10 now, so you should be good to go! I've only done limited testing on my 3.11 install, so let me know if anything else unexpected pops up. I'll close this out for now though. Thanks again! |
@apocalyptech thanks! |
Greetings. I am having trouble using your utility in linux:
I'm playing Animal Well through Wine, the --help option works fine, but when using any options with savegame file - this error occurs. Could you please clarify what the problem is?
The text was updated successfully, but these errors were encountered: