Upgrading topology from Python 2 to 3

33 views Asked by At

I had a Streamparse topology that was originally developed using Python 2. I am now trying to upgrade it to Python 3 using the 2to3 tool. I have also upgraded Streamparse to 3.15.1 (not sure which version the topology was originally developed against). When I try to run my topology using sparse run -d I get the following error:

AttributeError: 'ShellBoltSpec' object has no attribute 'componentId'

I presume it is because the ShellBoltSpec class has changed from Python 2 to Python 3 but I have no idea how to go about fixing this. Does anybody have any suggestions?

1

There are 1 answers

0
Inon Peled On

Regardless of 2to3, it could be that upgrading Streamparse to version 3.x.x broke backwards compatibility with the previous version you worked with, if that was 2.x.x or below. If so, you need to explicitly edit your code to be compatible with Steamparse 3.x.x.