Error while running inpspectdb in Django with MySQL Connector and Python 3 -


I am going to post a question and then posting the problem, I am resolving it after the trap Has been found

Command:

For some time I thought it would be useful to use InspectorDB To create data from a database to JGO, use MySQL Connector using C: \ myproj \ myproj & gt; Manage.py Observatory - Database = mydb & gt; Models.py

Resultant error (traceback for short):

  django.db.utils.IntegrityError: there is an error in your SQL syntax ; Check the manual related to your MySQL server version for the correct syntax to use a near '' decimal '' on line 1. 

So the solution is very quick, please note that credit goes to MARSIN Mikasysevsky who posted bugs and related solutions here: Although I thought it would be easy to find here on stack overflow.

There is an error in line 65 of the file (assuming you have installed Python in C: \ Python 33):

  C: \ Python 33 \ lib Replace the line 65:  
  "table_schema = database () and data_type = '\ site-packages \ mysql \ connector \ django \ introspection.py  

With 'table_schema = database () and data_type =' decimal '", [table_name]), with the command:' decimal ', [table_name])"

:

  " 

(Note the missing latitude after word decimal in the first version).

Your inspectdb command will now run correctly. / P>


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -