On Saturday, April 2, 2016 at 5:05:08 PM UTC-4, Justin Israel wrote:
>
>
>
> On Sun, Apr 3, 2016 at 12:28 AM Christopher. <crestchr...@gmail.com 
> <javascript:>> wrote:
>
>>
>>
>> On Saturday, April 2, 2016 at 12:04:27 AM UTC-4, Justin Israel wrote: 
>>
>>>
>>> I was hoping to just see the results so you could then answer if any of 
>>> those paths actually contain the python script you areare failing to import 
>>>
>>
>> The results of the command show none of the paths which contain strictly 
>> my Python Scripts.
>>
>
> Something is not adding up here.
> When I do the following test:
>
> *scripts/userSetup.mel*
>
> python("import sys; sys.path.append('FOO/BAR')")
>
> Then I launch maya and do:   print '\n'.join(sys.path)
>
> I see all of the other Maya paths, and the last line is "FOO/BAR".
> If you are not seeing your path at the end of a bunch of other lines, 
> something is strange. Did you check the top of your script editor for 
> errors when Maya was first launched?
>

There are no errors at the top of the script editor when Maya launches.  

When running this command; print '\n'.join(sys.path), the last line is not 
my Custom Python Scripts path.

In my system environment variable I have; MAYA_APP_DIR which points to a 
custom path overriding the default Maya default installation path which 
usually resides in MyDocuments > Maya > 201X-64. Therefore in the new 
MAYA_APP_DIR path, I have a Maya.env and in that Maya.env file I have the 
PYTHONPATH="" you most likely know this by now but I recapped for 
clarification.

In my userSetup.mel file, which rests in the custom path as stated in the 
MAYA_APP_DIR system environment variable specifically within; 
customPath\customPath2\Preferences\2015-x64\scripts

When restarting Maya and trying to run any Python script, they don't run, 
so my guess is, the Python scripts can't find the Python Modules.

 

>
> Similarly, if I completely remove userSetup.py and create userSetup.py in 
> its place (something I actually do anyways, as I use a py instead of a mel 
> script), I can do this:
>
> import sys
> sys.path.append("FOO/BAR")
>
> And when Maya launches and I print the sys.path, I still see "FOO/BAR" as 
> the last line. 
>  
>
>>  
>>
>>>
>>>
>>>> Sorry, what do you mean by sys.path, the only path in the userSetup.mel 
>>>> file or my system environment variable ? 
>>>>
>>>
>>> the result of printing that sys.path list and the thing you are 
>>> appending to in your userSetup.mel
>>>
>>>>
>>>>
>>> the thing is. .. this is normally a pretty straight forward problem to 
>>> solve. You append your custom locations to sys.path and away you go. the 
>>> problem may be in the ability to communicate your problem and the ability 
>>> to apply the suggestions you receive 
>>>
>>
>> If you knew the suggestions and how I explained the situation, to many 
>> you'd realize the frustration.  It's similar to explaining a problem to 
>> twenty different people which as I said I have, with such detail.  Anyway, 
>> the only paths to which the command is spitting out is the custom default 
>> maya scripts path, which is created from the MAYA_APP_DIR system 
>> environment variable, as I know and was also informed by others.
>>
>
> I can fully appreciate how frustrating this must be for you when multiple 
> people have given you suggestions and you cannot manage to arrive at a 
> working solution. It is also pretty challenging for the people making the 
> suggestions, when they feel they are giving a simple answer to a seemingly 
> simple problem and don't hear reasonable outcomes reported back from the 
> implementation of those suggestions.
>
> You made reference previously to altering your Maya.env file. Have you set 
> the value of PYTHONPATH within your Maya.env file? That is another way to 
> modify Maya's PYTHONPATH.
>  
>
>>  
>>
>>>
>>>
>>>>  
>>>>
>>>>>
>>>>>
>>>>>> I added the custom python scripts path to the userSetup.mel command 
>>>>>> as mentioned previously and no my scripts continue not to run. Not the 
>>>>>> custom scripts path, that is only where MEL scripts reside, rather the 
>>>>>> custom Python Script path as also in my Maya.env file as PYTHONPATH = "".
>>>>>>
>>>>>
>>>>> Why are we we talking about Mel in a python question? All I I wanted 
>>>>> to know was the absolute location of the python script that fails to 
>>>>> import 
>>>>> for you, and the contents of your sys.path in Maya to see where it is 
>>>>> checking 
>>>>>
>>>>> This is like pulling teeth. 
>>>>>
>>>>>
>>>>>> On Friday, April 1, 2016 at 10:01:41 PM UTC-4, Justin Israel wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Sat, 2 Apr 2016 12:56 PM Crest Christopher <crestchr...@gmail.com> 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> That wasn't the case when the Python Module path was in my system 
>>>>>>>> environment variable; I didn't need to have all my Python Maya scripts 
>>>>>>>> in 
>>>>>>>> the Python Modules path location ?
>>>>>>>>
>>>>>>>> Here is the absolute path for all my python scripts, same absolute 
>>>>>>>> path as listed in the Maya.env file for PYTHONPATH.
>>>>>>>>
>>>>>>>> C:\Custom Program Settings\Maya_Resources\pythonscript
>>>>>>>>
>>>>>>>
>>>>>>> You can either set your PYTHONPATH from the Maya.env or the 
>>>>>>> userSetup.mel 
>>>>>>> If you add your custom scripts location to the sys.path in your 
>>>>>>> userSetup.mel, does it then succeed in importing your script? 
>>>>>>>
>>>>>>> If not, go into the script editor and run:
>>>>>>>
>>>>>>> print '\n'.join(sys.path)
>>>>>>>
>>>>>>> And show us the results of that 
>>>>>>>
>>>>>>>>
>>>>>>>> Justin Israel
>>>>>>>> Friday, April 01, 2016 7:49 PM
>>>>>>>>
>>>>>>>> Yes it would work as long as your scripts are in that site packages 
>>>>>>>> location. What is the absolute path to your script? 
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> 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/CzEXgn-GIaI/unsubscribe
>>>>>>>> .
>>>>>>>> To unsubscribe from this group and all its topics, send an email to 
>>>>>>>> python_inside_maya+unsubscr...@googlegroups.com.
>>>>>>>>
>>>>>>>> To view this discussion on the web visit 
>>>>>>>> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3AvNa-k%3DJ5em7QATNpTqJihSLJkgVDsbSgg4iRrfnX4Q%40mail.gmail.com
>>>>>>>>  
>>>>>>>> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3AvNa-k%3DJ5em7QATNpTqJihSLJkgVDsbSgg4iRrfnX4Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>>
>>>>>>>>
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>> Crest Christopher
>>>>>>>> Friday, April 01, 2016 6:08 PM
>>>>>>>>
>>>>>>>> I don't know what else to explain. Have I missed a piece of 
>>>>>>>> information you want ? 
>>>>>>>>
>>>>>>>>
>>>>>>>> Justin Israel
>>>>>>>> Friday, April 01, 2016 4:26 PM
>>>>>>>>
>>>>>>>> Let's just cut to the chase and you tell me where your scripts 
>>>>>>>> *are* located? 
>>>>>>>> Obviously your standard environment has those locations in the 
>>>>>>>> PYTHONPATH and Maya's env does not. 
>>>>>>>>
>>>>>>>> It isn't a complicated concept. If you add the locationa of your 
>>>>>>>> scripts and dependencies to the sys.path in Maya, then you should be 
>>>>>>>> able 
>>>>>>>> to import your scripts 
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> 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/CzEXgn-GIaI/unsubscribe
>>>>>>>> .
>>>>>>>> To unsubscribe from this group and all its topics, send an email to 
>>>>>>>> python_inside_maya+unsubscr...@googlegroups.com.
>>>>>>>> To view this discussion on the web visit 
>>>>>>>> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2FDNvxBZLYWDQ8RPxRiGAbV8o2bxR9j6HV50CeLfjcVg%40mail.gmail.com
>>>>>>>>  
>>>>>>>> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2FDNvxBZLYWDQ8RPxRiGAbV8o2bxR9j6HV50CeLfjcVg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>> Crest Christopher
>>>>>>>> Friday, April 01, 2016 4:20 PM
>>>>>>>> No. 
>>>>>>>>
>>>>>>>> When I had a system environment variable set for Python modules, I 
>>>>>>>> didn't have all the Python scripts in the Python modules path and the 
>>>>>>>> scripts worked perfectly.
>>>>>>>>
>>>>>>>> Justin Israel wrote:
>>>>>>>> Justin Israel
>>>>>>>> Friday, April 01, 2016 3:06 PM
>>>>>>>> Are you python scripts inside that location?
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> 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/CzEXgn-GIaI/unsubscribe
>>>>>>>> .
>>>>>>>> To unsubscribe from this group and all its topics, send an email to 
>>>>>>>> python_inside_maya+unsubscr...@googlegroups.com.
>>>>>>>> To view this discussion on the web visit 
>>>>>>>> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1N%3Dh7iG8hd6JMUosF%3DUQJruTaXQPo5LpZMhz2v6ywyNQ%40mail.gmail.com
>>>>>>>>  
>>>>>>>> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1N%3Dh7iG8hd6JMUosF%3DUQJruTaXQPo5LpZMhz2v6ywyNQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> 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_maya+unsubscr...@googlegroups.com.
>>>>>>>> To view this discussion on the web visit 
>>>>>>>> https://groups.google.com/d/msgid/python_inside_maya/56FF0A9F.20904%40gmail.com
>>>>>>>>  
>>>>>>>> <https://groups.google.com/d/msgid/python_inside_maya/56FF0A9F.20904%40gmail.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>> -- 
>>>>>> 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_maya+unsubscr...@googlegroups.com.
>>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/python_inside_maya/6d106ea2-f86b-48ef-b1b6-20e2d9396014%40googlegroups.com
>>>>>>  
>>>>>> <https://groups.google.com/d/msgid/python_inside_maya/6d106ea2-f86b-48ef-b1b6-20e2d9396014%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>> -- 
>>>> 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_maya+unsubscr...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/python_inside_maya/43128183-8c53-4ffd-a521-c15a9c0ae85d%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/python_inside_maya/43128183-8c53-4ffd-a521-c15a9c0ae85d%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>> 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_maya+unsubscr...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/python_inside_maya/7645a17f-bd59-4cb7-838f-4d2424dd1e9d%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/python_inside_maya/7645a17f-bd59-4cb7-838f-4d2424dd1e9d%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/0669beac-65d8-4feb-bb4b-e08cac95874e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to