Open chrisnorman7 opened 7 years ago
I ran into this same problem... it looks like it's due to a breaking change in the attrs
package: https://github.com/python-attrs/attrs/pull/253
SQLAlchemy's declarative mode relies on setting class attributes to represent columns. When attrs >= 17.3.0
processes the class, I think it's stripping out those attributes and replacing them with some other mechanism. This results in the AttributeError
that you encountered above.
Unfortunately, I don't know enough about the inner workings of attrs
to propose a fix -- for now, I'm working around the issue by just pinning the attrs
version to 17.2.0.
If it helps anybody, I just submitted a pull request to restore support for attrs 17.3+: #13
Also, note that my PR is on the hash-by-id branch, so you should also review #10 and #11, which have their own breaking change you may care about.
Hi all, we're going ahead and deprecating attrs_sqlalchemy and do not recommend using it going foward (#14).
Hi, Been using (and loving) attrs_sqlalchemy for a large VR project and it's recently stopped working after I updated to the latest sqlalchemy (version above).
Here's proof-of-concept code with the traceback:
And here's the TB:
I'd be happy to go and try and affect a fix but I have no idea how. I'm going to start reading through your code and I will do my best to sort it myself. Do you have any pointers that might aid me in this? Of course if you fix it first that would be awesome! :-)
Cheers,
Chris