TheFoundryVisionmongers / nuke-ML-server

A Nuke client plug-in which connects to a Python server to allow Machine Learning inference in Nuke.
Apache License 2.0
135 stars 34 forks source link

Python3 and Protobuf #17

Closed fdan closed 4 years ago

fdan commented 4 years ago

Hi folks,

I'm modifying the server to run with Python3, as my ML environments require it.

I think I may have ran into some issues with protobuf. In my server output, I see the following:

Server -> Listening on port: 55555
Server -> Receiving message of size: 6
Server -> 6 bytes read
Server -> Message parsed
Server -> Received info request
Server -> Serializing message
Server -> Sending response message of size: 98
Server -> -----------------------------------------------

But the client output says, reporting it read data of size 0, instead of 98

Client -> Connected to 172.17.0.2
Client -> Sending info request
Client -> Created message
Client -> Serialized message
Client -> Created char array of length 6
Client -> Copied to char array
Client -> Message sent
Client -> Reading header data
Client -> Reading data of size: 0
Client -> Deserializing message
Client -> Closed connection

This is my first time using protobuf, so I thought I'd just enquire if there's anything obvious I should be looking for in terms of why it works with Python2 and not Python3,

cheers

ringdk commented 4 years ago

Hi!

Thanks for sending that in. Internally we've been testing a migration to Python 3 and I'm not sure if we've hit this one. Let us get back to you!

On Sun, Aug 16, 2020 at 5:22 AM fdan notifications@github.com wrote:

Hi folks,

I'm modifying the server to run with Python3, as my ML environments require it.

I think I may have ran into some issues with protobuf. In my server output, I see the following:

Server -> Listening on port: 55555 Server -> Receiving message of size: 6 Server -> 6 bytes read Server -> Message parsed Server -> Received info request Server -> Serializing message Server -> Sending response message of size: 98 Server -> -----------------------------------------------

But the client output says, reporting it read data of size 0, instead of 98

Client -> Connected to 172.17.0.2 Client -> Sending info request Client -> Created message Client -> Serialized message Client -> Created char array of length 6 Client -> Copied to char array Client -> Message sent Client -> Reading header data Client -> Reading data of size: 0 Client -> Deserializing message Client -> Closed connection

This is my first time using protobuf, so I thought I'd just enquire if there's anything obvious I should be looking for in terms of why it works with Python2 and not Python3,

cheers

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/TheFoundryVisionmongers/nuke-ML-server/issues/17, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIH2B554NS6URSPA6J4CVLSA5NHLANCNFSM4QAT4YQQ .

johannabar commented 4 years ago

Hi there, we have actually migrated the server from python2 to python3 in May!

You can pull the latest version of this repo which is by default in python3 (and still python2 compatible). If you previously built the python2 dockerfile, you will need to rebuild your python3 Docker image Plugins/Server/Dockerfile following the installation instructions and then it should work fine. Please let us know if you face any more issues!

fdan commented 4 years ago

Ahah, my bad, I cloned the repo before then and had neglected to pull for a while, will check out now.