Home > other >  TypeError: string argument without an encoding
TypeError: string argument without an encoding

Time:09-21

Python3.7 pymysql is 0.93

The System check identified no issues (0 silenced).
Unhandled exception in the thread started by & lt; The function check_errors. & lt; Locals> The wrapper at 0 x000001ab98954948 & gt;
Traceback (the most recent call last) :
The File "D: \ anaconda \ lib \ site - packages \ django \ utils \ autoreload py", line 225, wrapper in
Fn (* args, * * kwargs)
The File "D: \ anaconda \ lib \ site - packages \ django/core/management/commands \ runserver then executes py", line 120, in inner_run
Self. Check_migrations ()
The File "D: \ anaconda \ lib \ site - packages \ django \ core \ management \ base py", line 442, in check_migrations
Executor=MigrationExecutor (connections [DEFAULT_DB_ALIAS])
The File "D: \ anaconda \ lib \ site - packages \ django \ db \ migrations \ executor py", line 18, in __init__
Self. Loader=MigrationLoader (self. Connection)
The File "D: \ anaconda \ lib \ site - packages \ django \ db \ migrations \ loader py", 49, line in __init__
Self. Build_graph ()
The File "D: \ anaconda \ lib \ site - packages \ django \ db \ migrations \ loader py", line 209, in build_graph
Self. Applied_migrations=recorder. Applied_migrations ()
The File "D: \ anaconda \ lib \ site - packages \ django \ db \ migrations \ recorder py", line 61, in applied_migrations
If self. Has_table () :
The File "D: \ anaconda \ lib \ site - packages \ django \ db \ migrations \ recorder py", line 44, in has_table
. Return the self Migration. _meta. Db_table in self. Connection. Introspection. Table_names (self. The connection. The cursor ())
The File "D: \ anaconda \ lib \ site - packages \ django \ db \ backends \ base \ introspection py", 56, line in table_names
Return get_names (cursor)
The File "D: \ anaconda \ lib \ site - packages \ django \ db \ backends \ base \ introspection py", 51, the line in get_names
Return sorted (ti) name for ti in self. Get_table_list (cursor)
The File "D: \ anaconda \ lib \ site - packages \ django \ db \ backends \ mysql \ introspection py", line 55, in get_table_list
Cursor. The execute (" SHOW FULL TABLES ")
The File "D: \ anaconda \ lib \ site - packages \ django \ db \ backends \ utils py", line 100, in the execute
Return super (). The execute (SQL, params)
The File "D: \ anaconda \ lib \ site - packages \ django \ db \ backends \ utils py", line 68, in the execute
Return the self. _execute_with_wrappers (SQL, params, many=False, executor=self. _execute)
The File "D: \ anaconda \ lib \ site - packages \ django \ db \ backends \ utils py", line 77, in _execute_with_wrappers
Return executor (SQL, params,, context)
The File "D: \ anaconda \ lib \ site - packages \ django \ db \ backends \ utils py", line 83, in _execute
Return the self. The cursor. The execute (SQL)
The File "D: \ anaconda \ lib \ site - packages \ django \ db \ backends \ mysql \ base py", line 71, in the execute
Return the self. The cursor. The execute (query, args)
The File "D: \ anaconda \ lib \ site - packages \ pymysql \ your cursors py", line 170, in the execute
Result=self. _query (query)
The File "D: \ anaconda \ lib \ site - packages \ pymysql \ your cursors py", line 328, in _query
Conn. Query (q)
The File "D: \ anaconda \ lib \ site - packages \ pymysql \ connections py", line 517, in the query
Self. _affected_rows=self. _read_query_result (unbuffered=unbuffered)
The File "D: \ anaconda \ lib \ site - packages \ pymysql \ connections py", line 732, in _read_query_result
Result. The read ()
The File "D: \ anaconda \ lib \ site - packages \ pymysql \ connections py", line 1082, in the read
Self. _read_result_packet (first_packet)
The File "D: \ anaconda \ lib \ site - packages \ pymysql \ connections py", line 1152, in _read_result_packet
Self. _read_rowdata_packet ()
The File "D: \ anaconda \ lib \ site - packages \ pymysql \ connections py", line 1190, in _read_rowdata_packet
Rows. Append (self. _read_row_from_packet (packet))
The File "D: \ anaconda \ lib \ site - packages \ pymysql \ connections py", line 1209, in _read_row_from_packet
Data=https://bbs.csdn.net/topics/converter (data)
TypeError: string argument without an encoding
Pymysql connections
If the DEBUG: print (" DEBUG: DATA="HTTP://https://bbs.csdn.net/topics/, DATA)
If the converter is not None:
Data=https://bbs.csdn.net/topics/converter (data)
This has been an error,

CodePudding user response:

Put the error code? The title of the you said that the string you need first transcoding (encoding)
  • Related