-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add support for Maya 2022 with Python 3.7 #25
Comments
Yeah, this would be a much needed update for me, thanks! |
Thanks for reporting, let me have a look and get back |
Thanks a lot |
me too |
Apologies this is taking a while, just got my hands on a copy of 2022. |
ok so one quick solution is to avoid using the so instead of this
you can run just this
Note that you need to do this in a new maya session, as you cannot modify the ports you have already opened. There is a bug in this file, that is causing the issue with echo output. |
@artbycrunk I think there is another improvement to make. |
Sorry that I can't make a pull request because I'm still newbie in programming and afraid to mess your code up. |
Love this extension, would love an update to |
Just to confirm, this does not work with a fresh install of Maya 2022 with the same error described above:
|
@CraigMason |
You can change the execfile line to: cmd = extension.js file should be located at C:\Users\name\.vscode\extensions\saviof.mayacode-1.4.0\out |
Hello, Can @artbycrunk b a hero do all this in the main branch and ad a toggle option to the config? EDIT: thx 4 the quick reponse |
@NicTanghe @Vitali-Iakovlev @Ruka1998 @CraigMason @ZachGray @ypypjay @a690089735 @Rourker @1fth3n3ls3 |
Thanks for the update!
Sorry about that, missed the post about
This is the same error at the top of the thread. Curious why it might be changing after first execution.
|
@ZachGray I am not able to reproduce this, |
Hi guys, for everyone who still have issues with socketserver and other stuff from this thread, Thanks everyone, btw |
Hi I have seen this post in the autodesk site that talks about this issue in particular. It seems like from Python2.7 to 3.7 maya expects a command to be passed as a bytes instead of strings. The link includes possible solutions so feel free to give it a look :) |
+1 what @mrbmp33 said Not to double post but here's what I found debugging this issue in Maya 2023: I have an update on what I found after doing a little digging around in Maya's source scripts. in the file On line 134, as an experiment I changed it from: to:
effectively telling it to go ahead and execute the message in the commandMessageQueue but don't do the self.wfile.write(). And wouldn't you know it, after reloading Maya everything worked as expected.
and I'm not sure what you will have to do to update your extension, obviously we can't all edit our Maya source code to make this work, but hopefully this will lead you in the right direction? |
@kristafervale Thanks for your input... you save the day :) |
Ref: import maya.cmds as cmds
cmds.commandPort(name="127.0.0.1:7002", stp="python")
cmds.commandPort(name="127.0.0.1:7001", stp="mel")` |
To debug Above Maya 2022 Python code in VS Code, you can use the "Debugger for Maya" extension available here: For guidance on how to use it, check out this video tutorial: |
When I try to execute Send Python Code to Maya I get this error.
`
The text was updated successfully, but these errors were encountered: