-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
taskInfo bytecode string incompatibility in py3 #605
Comments
Hello! Sorry, I did not got were, why and what you are parsing? |
Hi @timurhai, Looking at: cgru/afanasy/python/services/events.py Line 104 in 91c93d4 Just imagine, we would add a This would result in We ecounter the same issue in the parser. cgru/afanasy/python/parsers/parser.py Line 64 in 91c93d4 Also if we would add a
We have this byte String interpretation since we use a python3x build with our renders. Or is it only us? Thanks |
|
We are still at CentOS linux 7 but will jump to Alamalinux Does it mean you dont have the same thing happening to you @lithorus ? Maybe it could be build related. |
Let me rewind and rephrase what @eberrippe originally posted: Before we compiled Afanasy 3.3.0 with Python 2.7 on CentOS 7. We had "normal" strings in the {
"wdir":"/tmp",
"parser":"nuke",
"command_block":"nuke -F @#@-@#@/1 -V 2.nk\",
"command_task":"",
"capacity":4,
... Now we started to compile afanasy 3.3.0 with Python 3.10 on CentOS 7. And when printing the {
"wdir":"/tmp",
"parser":"b""nuke",
"command_block":"b""nuke -F @#@-@#@/1 -V 2.nk\"",
"command_task":"b""",
"capacity":4,
... What Python versions are you guys using? I suppose you are not seeing this? |
I was more interested in seeing some actual sample code. Is is submitted through within Nuke (and which version)? We submit from within the DCC's with our own tools, which means it's a wide range of python versions. Also Try to describe exactly which steps the submission go through (and with code examples). To me it looks like you're generating something in python, but does the actual submission through a command line using eg. |
Here is a very basic example you can try : import af
job = af.Job("test job")
job.setProject("project")
job.setDepartment("department")
block = af.Block("test block")
block.setCommand("echo dummy job")
block.setNumeric(1, 1, 1)
job.blocks.append(block)
print(job.data)
job.send() This will also print what is sent to the server. |
Also, compiling it with python3 doesn't make it more compatible with DCCs running python3. It's only python3 in afrender's parsers and services, etc. |
Hi @timurhai ,
We have updated our renders/servers to run with Python 3.10 instead of Python 2.7. Since this update, we've encountered an issue in the taskInfo within events/services/parsers where certain strings are being parsed as byte strings (e.g., b"hello world") instead of standard strings. This discrepancy is causing several issues in the system.
Could you modify these entries upstream to ensure they are correctly interpreted as regular strings?
Here are examples of entries that are currently being parsed as byte objects:
Thanks a lot!
Jan
The text was updated successfully, but these errors were encountered: