TypeError "A Message class can only inherit from Message"

128 views
Skip to first unread message

karlk

unread,
Jan 24, 2020, 10:55:09 AM1/24/20
to Protocol Buffers

I am getting a TypeError from protobuf, specifically from line 69 of google/protobuf/duration_pb2.py with the error message "A Message class can only inherit from Message". And the code actually getting run does not use protobuf at all (as far as I can tell python is merely attempting to load the module). Has anyone else seen this?


This is protobuf 3.11.2, python v 3.7.4, django 2.2.9 and apache 2.4


I am unable to recreate it except on a machine running wsgi (doesn't happen in unittests or in django running the local dev server [i.e., 'python manage.py runserver']).


I have tried uninstalling / re-installing it without any luck. Does anyone have any ideas?

karlk

unread,
Jan 24, 2020, 2:46:28 PM1/24/20
to Protocol Buffers
Update:  I was able to make this go away by adding the line

WSGIApplicationGroup %{GLOBAL}

to my apache config
Reply all
Reply to author
Forward
0 new messages