top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

MySQLdb having problem with Python

+1 vote
168 views

I have installed, de-installed and reinstalled this s/w and MySQL itself on my Win8 box. However, when I go to use it from a script, I get the following error:

"C:Python27libsite-packagesMySQLdb__init.py__", line 27 in  import _mysql
ImportError: DLL load failed: %1 is not valid Win32 application. 

I'm running Win8 which is 64-bit, Python 27, MySQL 5.5. Please help?

posted Aug 31, 2013 by Naveena Garg

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+1 vote

Do your Python and your MySQLdb match? I haven't confirmed, but I'm pretty sure you'll have problems if you have a 32-bit Python with a 64-bit mysqldb DLL, or vice versa.

answer Aug 31, 2013 by Jagan Mishra
Yeah, that turned out to be the problem. What's strange is that it worked before.
Possibly you upgraded to a new version of Python (even from 2.7.3 to 2.7.5 or something, which wouldn't otherwise break stuff) and downloaded the other form of executable? Anyway, glad it's sorted.
Similar Questions
+2 votes

I have an application which uses extensively python 2.7.6 (CPython).

The issue that I see is the following: "If there are only pyc files, the loading time of the application is much more than if I have pyc and py files. It is behind with 2 minutes more than if it had py files"

Do you have any idea why this is happening?

+2 votes

http://www.python.org/workshops/1998-11/proceedings/papers/montanaro/montanaro.html

Just wanted to clarify whether CPython already includes these kind of byte code optimizations? Are all the temporary variables removed when byte code is generated?

0 votes

I'm running a box with Debian squeeze, and I just ran:

sudo aptitude install jython

which ended up installing Python 2.5:

[...]
Linking and byte-compiling packages for runtime python2.5...
Setting up python2.5 (2.5.5-11) ...

Does anyone know why CPython 2.5 is a dependency for Jython 2.5.1+ on Debian squeeze?

0 votes

I'm currently trying to make sense of Python's Timsort function. From the wikipedia page I was told the algorithm is located somewhere here: http://hg.python.org/cpython/file/default/Objects/listobject.c

So of all the functions in there, could somebody point to me which one is timsort?

+1 vote

I have a quick question; Should I download a free antivirus program like AVG to supplement window defender or is window defender all I need with windows 8.1 ?

If I did download AVG free would there be any conflict issues with window defender ?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...