mayapy.exe issue

63 views
Skip to first unread message

Padraig Ó Cuínn

unread,
Dec 7, 2015, 1:40:31 AM12/7/15
to Python Programming for Autodesk Maya


PysideCode
    myTool
        myToolUI
            __init__.py
            myToolUI.py
        MyToolCode
            __init__.py   
    __init__.py
    qtshim.py
    mayautils.py
__init__.py


Hi everyone above is my current working directory, as you can see they all have their __init__.py files and can be easily accessed from code.
So what is my problem.... well then...

I cannot get to qtshim.py from mayapy.exe I am using fully qualified naming

from PysideCode.myTool.qtshim import QtGui, QtCore, Signal  <<< Yes from Robs Book :)

importError : No module names PysideCode.MyTool.qtshim

here is the weird part >>> script editor accepts it and so does Pycharm, 

PYTHONPATH = C:\Users\OCuinn\Dropbox\Maya Scripts\Python Code\PysideCode

its in sys.path and in windows environment variables

however > set PYTHONPATH=%PYTHONPATH%;C:\Users\OCuinn\Dropbox\Maya Scripts\Python Code\PysideCode goes through but comes out False when checked every time.


EXPERTS I NEED YOUR HELP!

Padraig

David Moulder

unread,
Dec 7, 2015, 1:46:27 AM12/7/15
to Python Programming for Autodesk Maya

You're a folder to deep when setting the python path.  Hope that helps.


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/786e3fb5-4e3c-49f5-8ca1-52a4438825ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kurian O.S

unread,
Dec 7, 2015, 1:58:42 AM12/7/15
to python_in...@googlegroups.com
PysideCode.MyTool.qtshim is not != PysideCode.myTool.qtshim :)


For more options, visit https://groups.google.com/d/optout.



--
--:: Kurian ::--

Padraig Ó Cuínn

unread,
Dec 7, 2015, 2:21:21 AM12/7/15
to python_in...@googlegroups.com

Still no luck after changing the variables path

Padraig

You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/c40LWKxBb9k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CANEMyhPAFm4vcM-sNmw6DZm8fe6raq4uFnk%3DeVp1qSH3OetBbQ%40mail.gmail.com.

Justin Israel

unread,
Dec 7, 2015, 2:38:23 AM12/7/15
to python_in...@googlegroups.com

You have a discrepancy between what you say is your import statement, and what you say you are adding to your PYTHONPATH.

If you are adding up to and including PysideTools to PYTHONPATH, then your import statement should not have include PysideTools in the namespace.

Please confirm you exact import statement and your exact PYTHONPATH


Padraig Ó Cuínn

unread,
Dec 7, 2015, 2:53:42 AM12/7/15
to Python Programming for Autodesk Maya
exact PYTHONPATH = C:\Users\OCuinn\Dropbox\Maya Scripts\Python Code <<<< This is the main Root Folder and holds API/Python/ PythonAPI/ and Mel folders aswell as PysideCode 

In windows Environment variables its the same

from PysideCode.book.qtshim import QtGui, QtCore, Signal     <<<< I did want them in PysideCode so i can access then through out all of the entire PySide projects 

when i have everything in the one place it gets imported and works but I don't want that.

PysideCode has a UI folder and a Code folder both with __init__.py  (every folder i create has an init regarding python)

Thanks

Padraig

Justin Israel

unread,
Dec 7, 2015, 3:06:21 AM12/7/15
to Python Programming for Autodesk Maya

What is the "book" namespace now?

And did you actually try:

from PysideCode.qtshim import QtGui, QtCore, Signal


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

Padraig Ó Cuínn

unread,
Dec 7, 2015, 10:39:55 AM12/7/15
to python_in...@googlegroups.com

Yeah I tried it and no avail.

Python Code/PysideCode/book/qtshim.py

Padraig

You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/c40LWKxBb9k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1CUdOsb8_V50mBBq90BweaiF8faXfjoRFVL%2Bc8vHZLdw%40mail.gmail.com.

Padraig Ó Cuínn

unread,
Dec 7, 2015, 11:29:05 PM12/7/15
to python_in...@googlegroups.com

Ok soooo
I managed to get it working in powershell by  creating a new user profile and setting the variable on it that way and it executed nicely.  Weirdly enough i was never able to work with cmd.exe as it always came back false for set pythonpath %pythonpath%path/to/take/

Padraig

Reply all
Reply to author
Forward
0 new messages