Flask and Keras model Error ''_thread._local' object has no attribute 'value''?

So after a long night, Keras had released a new version 2.3.0 in Sep 17,19. As part of revision update I did, I updated all libraries, Keras among them. Since I did it the message appeared.

After I downgraded back to Keras 2.2.5 The problem disappeared.


If it is still relevant, I fixed this problem just by changing

from keras.models import Sequential

from keras.layers import Dense, Dropout, LSTM

to

from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, LSTM

So, no need to turn off multithreading.