-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Duplicate keyword '_binary' failure when using BinaryField in Django #549
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
Comments
For note, a temporary solution is |
hi can i ask how you got pymysql working with django in first place, have a connection doesnt exist error, details here: https://dpaste.de/8Oya . also got error: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named 'MySQLdb' |
Anyone test on 0.7.11 ? The solution for me is use "ImageField" and store images out from database. @kinganu Here you go.
|
@ace-han As you discovered in your Django issue , the mysqlclient-python fix for this issue PyMySQL/mysqlclient#106 is to hide the additional We can do this in PyMySQL, but it's made more difficult by the fact that the |
Yes. Current But Django uses it.... |
I will suggest PyMySQL can setup a time to deprecate and remove this method in near future. Ugly fix/implementation is not good +1 |
@methane How do I integrate with Anything adds to below in import pymysql
pymysql.install_as_MySQLdb() |
I don't know Django. I'm not Django user. |
Process to reproduce
will get error
The pre-generated sql is like below
The final sql is like below
As we can see, there are two _binary in the final sql which will fail eventually
After a little debugging, I found these _binary in
, which I think is the root cause
I think we can refer to below links to get a solution,
PyMySQL/mysqlclient#106
PyMySQL/mysqlclient#140
Maybe making it optional to add _binary prefix is a nice idea 😄
PyMySQL
is great in its pure python implementation to ease the installation on diff OS platform.I really want this to be fixed, please kindly help, thx.
The text was updated successfully, but these errors were encountered: