Skip to content
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

Compatibility issue with Maya 2022 #32

Open
Jordandionduval opened this issue May 26, 2022 · 1 comment
Open

Compatibility issue with Maya 2022 #32

Jordandionduval opened this issue May 26, 2022 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@Jordandionduval
Copy link

Description

There seems to be issues when running this through maya 2022. I tested with maya 2020 and it works just fine, but 2022 blocks at an error code and can't send through commands to Maya.

To Reproduce
Steps to reproduce the behavior:

  1. Execute "commandPort -name "localhost:7001" -sourceType "mel" -echoOutput;" in maya's script editor
  2. Go to visual studio code
  3. Type a test code print("hello")
  4. First time around: See code output in script editor along with error code
  5. Any further attempts: Error code

Expected behavior
Command output in the script editor

Result

 # TypeError: a bytes-like object is required, not 'str'
# ----------------------------------------
# ----------------------------------------
# Exception happened during processing of request from('127.0.0.1', 50484)
# Traceback (most recent call last):
# #   File "C:\Program Files\Autodesk\Maya2022\Python37\lib\socketserver.py", line 316, in _handle_request_noblock
    self.process_request(request, client_address)
# #   File "C:\Program Files\Autodesk\Maya2022\Python37\lib\socketserver.py", line 347, in process_request
    self.finish_request(request, client_address)
# #   File "C:\Program Files\Autodesk\Maya2022\Python37\lib\socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
# #   File "C:\Program Files\Autodesk\Maya2022\Python37\lib\socketserver.py", line 720, in __init__
    self.handle()
# #   File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\maya\app\general\CommandPort.py", line 134, in handle
    self.wfile.write(self.server.commandMessageQueue.get() + self.resp_term)
# #   File "C:\Program Files\Autodesk\Maya2022\Python37\lib\socketserver.py", line 799, in write
    self._sock.sendall(b)

Additional context
The code did go through once, but I couldn't get it to print "hello" after, even after rebooting maya, visual studio code and resetting the port using the command found in visual studio code when I close maya:
commandPort -n "localhost:7001" -stp "mel" -echoOutput;

Settings

Windows
Edition: Windows 10 Home
Version: 21H2
OS build: 19044.1706

Maya
Version: Autodesk MAYA 2022

MayaCode
Version: v1.5.0

@artbycrunk artbycrunk self-assigned this Jun 7, 2022
@artbycrunk artbycrunk added the question Further information is requested label Jun 7, 2022
@artbycrunk
Copy link
Owner

HI @Jordandionduval

try using this command instead

commandPort -n "localhost:7001" -stp "mel";

check this thread as well for resolution #25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants