I'm using Spyder to do some small projects with Keras, and every now and then (I haven't pinned down what it is in the code that makes it appear) I get this message:
File "~/.local/lib/python3.5/site-packages/google/protobuf/descriptor_pb2.py", line 1771, in <module>
__module__ = 'google.protobuf.descriptor_pb2'
TypeError: A Message class can only inherit from Message
Weirdly, this exception is not raised if I execute the program outside of Spyder, using the terminal. I've looked around and I have found no one who has encountered this error while using Keras.
Restarting Spyder makes it go away, but it's frustrating. What could be causing it?
I had the same problem with Spyder, which happened when it was trying to reload modules that were already loaded. I solved it by disabling the UMR (User Module Reloader) option in "preferences -> python interpreter" .
Ok, I found the cause: interrupting the execution before Keras fully loads.
As said before restarting Spyder (or just the console) solves it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With