Setting up Tyk + Python Middlewares

Hey everyone. I’m digging up a issue I’m having since yesterday and it’s time to search for help.

Here are the logs I’m getting on debug mode:

[Mar  8 17:04:56]  INFO python: Initializing interpreter, Py_Initialize()
Traceback (most recent call last):
  File "/opt/tyk-gateway/coprocess/python/", line 7, in <module>
    from tyk.object import TykCoProcessObject
  File "/opt/tyk-gateway/coprocess/python/tyk/", line 6, in <module>
    import coprocess_common_pb2 as HookType
  File "/opt/tyk-gateway/coprocess/python/proto/", line 82, in <module>
    options=None, file=DESCRIPTOR),
TypeError: __new__() got an unexpected keyword argument 'file'
[Mar  8 17:04:56] ERROR coprocess: can't initialize a dispatcher

Using Ubuntu.

Looking at the protobuf python code, it doesn’t seem to have a argument named file (protobuf/ at main · protocolbuffers/protobuf · GitHub)

Solved by uninstalling and reinstalling protobuf.