Django undefined symbol: PyUnicode_AsUTF8

2024/10/15 11:20:25

I am new to Python/Django. I have set up the environment needed to run Django project.When I'm trying to migrate an existing project , it shows up this error

django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module:   
/usr/local/lib/python3.2/dist-packages/mysqlclient-1.3.6-py3.2-linux-i686.egg
/_mysql.cpython-32mu.so: undefined symbol: PyUnicode_AsUTF8

Please can anyone figure out the reason for this error. Thanks in advance.

Answer

Its a bug in mysqlclient. There are some compatibility issues in mysqlclient with Python's 3.2 version. Apparently, mysqlclient is still not supported in Python 3.2.

Check this django-developers google group thread where this issue was raised and discussed. https://groups.google.com/forum/#!topic/django-developers/n-TI8mBcegE

https://en.xdnf.cn/q/117836.html

Related Q&A

using a variable keyword for an optional argument name with python argparse

I am using argparse for a python script I am writing. The purpose of the script is to process a large ascii file storing tabular data. The script just provides a convenient front-end for a class I have…

Error while setting up MongoDB with django using django mongodb engine on windows

Steps I followed :pip install git+htp://github.com/django-nonrel/[email protected]It did not work, so I downloaded the zip from the site "htp://github.com/django-nonrel/django" and pasted the…

Python login page with pop up windows

I want to access webpages and print the source codes with python, most of them require login at first place. I have similar problem before and I have solved it with the following code, because they are…

Calculate Scipy LOGNORM.CDF() and get the same answer as MS Excel LOGNORM.DIST

I am reproducing a chart in a paper using the LOGNORM.DIST in Microsoft Excel 2013 and would like to get the same chart in Python. I am getting the correct answer in excel, but not in python.In excel …

Python MySQLdb cursor.execute() insert with varying number of values

Similar questions have been asked, but all of them - for example This One deals only with specified number of values.for example, I tried to do this the following way:def insert_values(table, columns, …

Searching in a .txt file and Comparing the two values of a string in python?

"cadence_regulatable_result": "completeRecognition","appserver_results": {"status": "success","final_response": 0,"payload": {"…

How to perform an HTTP/XML authentication with requests

I am trying to authenticate to Docushare with Python 3.4 using requests 2.7. I am relatively new to Python and to the requests module but Ive done a lot of reading and am not able to make any more prog…

webPy Sessions - Concurrent users use same session and session timeout

I have a webPy app using sessions for user authentication. Sessions are initiated like so:web.config.debug=Falsestore = web.session.DiskStore(/path_to_app/sessions) if web.config.get(_session) is None:…

get text content from p tag

I am trying to get description text content of each block on this page https://twitter.com/search?q=data%20mining&src=typd&vertical=default&f=users. html for p tag looks like<p class=&q…

Python - making a function that would add - between letters

Im trying to make a function, f(x), that would add a "-" between each letter:For example:f("James")should output as:J-a-m-e-s-I would love it if you could use simple python function…