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

Can not get output in sublime to work #29

Open
vicro opened this issue Jan 25, 2017 · 13 comments
Open

Can not get output in sublime to work #29

vicro opened this issue Jan 25, 2017 · 13 comments

Comments

@vicro
Copy link

vicro commented Jan 25, 2017

I get the following error in Maya's script editor

# Traceback (most recent call last):
#   File "<string>", line 17, in <module>
#   File "<string>", line 1, in <module>
#   File "<string>", line 25, in _MayaSublime_streamScriptEditor
# NameError: global name 'sys' is not defined

I noticed you did a commit where you added import sys to pubScriptEditor.py. Installed latest version but I still get the error.
Any ideas?
Im using Maya2016 Extension 2

@justinfx
Copy link
Owner

It usually takes at most a day for the changes to sync up with the Sublime Package Control system and then be delivered back to those that are using automatic updates. Are you using it through Package Control and has it updated to 3.0.2? Have you checked your package location to confirm the code has been updated to the latest version?

@vicro
Copy link
Author

vicro commented Jan 30, 2017

I just tryed removing the package, and installing again from Package control, Opened the code and it has the sys import.
Still getting the error.
Python is different version, Is Maya Python different from installed python? some env_var missing?

@justinfx
Copy link
Owner

It seems that Sublime Package Control updated their format, possibly, and is not automatically picking up my updates. It did not pick up release 3.0.2 because it says the last release date it is using is a day before the 3.0.2 release. I've submitted a pull to update the settings.

wbond/package_control_channel#6107

In the meantime, you could also manually clone MayaSublime to your package location.

@justinfx
Copy link
Owner

justinfx commented Feb 4, 2017

Did this end up working for you?

@vicro
Copy link
Author

vicro commented Feb 7, 2017

I tried with the latest source from here.

Now I'm getting this error in Maya's script editor

# Traceback (most recent call last):
#   File "<string>", line 19, in <module>
#   File "<string>", line 1, in <module>
# NameError: name '_MayaSublime_streamScriptEditor' is not defined

sys error is gone but still not working. :(

@justinfx
Copy link
Owner

justinfx commented Feb 8, 2017

I've just tested this, with a fresh install from Package Control, using Maya 2016 ext2, and it works as expected. Can you try making sure you have removed all traces of MayaSublime, and then install it fresh from Package Control? You may want to make sure you have cleared your user prefs in case that is causing a problem.

@kurtontheway
Copy link

@justinfx ,I'm using the latest version, and I can get "receive_maya_output" work only if I set "no_collisions" to true. Otherwise, I get the same error "# NameError: name '_MayaSublime_streamScriptEditor' is not defined".

@justinfx
Copy link
Owner

justinfx commented Jun 30, 2017

@kurtontheway , I was able to reproduce this as you said, by enabling "receive_maya_output" and disabling "no_collisions". The problem was that the callback was only ever being installed into the private python namespace. I've pushed fixes to install it to the appropriate namespace (global or private) based on the settings.

Can you confirm the master branch works for you? If so, I can tag it as 3.0.3 to it releases to package control

@justinfx justinfx reopened this Jun 30, 2017
@justinfx
Copy link
Owner

justinfx commented Jul 2, 2017

Tagged as release 3.0.4:
https://github.com/justinfx/MayaSublime/releases/tag/3.0.4

@justinfx justinfx closed this as completed Jul 2, 2017
@kurtontheway
Copy link

@justinfx , Sorry for the late response and thank you for the quick fix, but I was unable to receive any maya output in sublime console by enabling "receive_maya_output" and disabling "no_collisions", no error messages as well.

@justinfx
Copy link
Owner

justinfx commented Jul 3, 2017

Even after restarting Maya./Sublime? I at first saw the same issue because the old code was still loaded in Maya. But then I was seeing output in the Sublime console.

@kurtontheway
Copy link

After restarting both Maya and Sublime.

@justinfx justinfx reopened this Jul 7, 2017
@justinfx
Copy link
Owner

justinfx commented Jul 7, 2017

Sorry, I have been really busy but I will find time to look at it again. It must have something to do with the two namespaces causing headaches

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

No branches or pull requests

3 participants