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/dispatcher.py", line 7, in <module>
    from tyk.object import TykCoProcessObject
  File "/opt/tyk-gateway/coprocess/python/tyk/object.py", line 6, in <module>
    import coprocess_common_pb2 as HookType
  File "/opt/tyk-gateway/coprocess/python/proto/coprocess_common_pb2.py", 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/descriptor.py at main · protocolbuffers/protobuf · GitHub)

Solved by uninstalling and reinstalling protobuf.