-
Notifications
You must be signed in to change notification settings - Fork 1k
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
运行app.py时如下报错,是什么原因呢 #141
Comments
新的后端报错 |
一样报错 |
同样的错误 setting an array element with a sequence. |
D:\anaco\python.exe D:/gitworks/chatbot-master/chatbot-master/Chatbot-tensowflow2.0/Seq2seqchatbot/web/app.py 2022-07-29 15:20:47.633892: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found 2022-07-29 15:20:47.633993: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. WARNING:tensorflow:From D:\gitworks\chatbot-master\chatbot-master\Chatbot-tensowflow2.0\Seq2seqchatbot\seq2seqModel.py:4: experimental_run_functions_eagerly (from tensorflow.python.eager.def_function) is deprecated and will be removed in a future version. Instructions for updating: Use
tf.config.run_functions_eagerly` instead of the experimental version.2022-07-29 15:20:49.307136: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found
2022-07-29 15:20:49.307255: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
2022-07-29 15:20:49.309705: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: LAPTOP-UEUEEB6P
2022-07-29 15:20:49.309823: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: LAPTOP-UEUEEB6P
2022-07-29 15:20:49.310104: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
D:\gitworks\chatbot-master\chatbot-master\Chatbot-tensowflow2.0\Seq2seqchatbot\web/train_data\seq.data
D:\gitworks\chatbot-master\chatbot-master\Chatbot-tensowflow2.0\Seq2seqchatbot/D:\gitworks\chatbot-master\chatbot-master\Chatbot-tensowflow2.0\Seq2seqchatbot\web/train_data\seq.data
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
WARNING: This is a development server. Do not use it in a production deployment.
192.168.2.155 - - [29/Jul/2022 15:21:01] "GET / HTTP/1.1" 200 -
192.168.2.155 - - [29/Jul/2022 15:21:01] "GET /static/res/hd2.jpg HTTP/1.1" 404 -
Building prefix dict from the default dictionary ...
Loading model from cache C:\Users\WENJIE~1\AppData\Local\Temp\jieba.cache
2
Loading model cost 0.477 seconds.
Prefix dict has been built successfully.
C:\Users\WENJIE_2021\AppData\Roaming\Python\Python39\site-packages\numpy\core_asarray.py:83: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
return array(a, dtype, copy=False, order=order)
[2022-07-29 15:21:05,122] ERROR in app: Exception on /message [POST]
TypeError: int() argument must be a string, a bytes-like object or a number, not 'list'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\anaco\lib\site-packages\flask\app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "D:\anaco\lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "D:\anaco\lib\site-packages\flask\app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "D:\anaco\lib\site-packages\flask_compat.py", line 39, in reraise
raise value
File "D:\anaco\lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "D:\anaco\lib\site-packages\flask\app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "D:\gitworks\chatbot-master\chatbot-master\Chatbot-tensowflow2.0\Seq2seqchatbot\web\app.py", line 44, in reply
res_msg = execute.predict(req_msg)
File "D:\gitworks\chatbot-master\chatbot-master\Chatbot-tensowflow2.0\Seq2seqchatbot\execute.py", line 117, in predict
inputs = tf.keras.preprocessing.sequence.pad_sequences([inputs],maxlen=max_length_inp,padding='post')
File "C:\Users\WENJIE_2021\AppData\Roaming\Python\Python39\site-packages\keras\preprocessing\sequence.py", line 152, in pad_sequences
return sequence.pad_sequences(
File "C:\Users\WENJIE_2021\AppData\Roaming\Python\Python39\site-packages\keras_preprocessing\sequence.py", line 98, in pad_sequences
trunc = np.asarray(trunc, dtype=dtype)
File "C:\Users\WENJIE_2021\AppData\Roaming\Python\Python39\site-packages\numpy\core_asarray.py", line 83, in asarray
return array(a, dtype, copy=False, order=order)
ValueError: setting an array element with a sequence.
192.168.2.155 - - [29/Jul/2022 15:21:05] "POST /message HTTP/1.1" 500 -
2022-07-29 15:21:59 - heartbeat`
The text was updated successfully, but these errors were encountered: