I don't really know how to respond to this, to be honest. If your
script is in your PYTHONPATH, then you should be able to import it. If
you haven't imported it, then you can't access it. If you can't import
it, then you have something wrong in either your environment, or you
put it in a sub-directory that doesnt have an __init__.py
Python scripts should not go in your mel script path.
On Mon, Oct 19, 2015 at 1:33 PM Christopher.
<[email protected] <mailto:[email protected]>> wrote:
I know there isn't a good error message, but out of;
Cannot find procedure or Name Error file <maya console> line 1 is
not defined are they both one in the same with regards to error
messages. The script is a python script, when placed in the
custom scripts folder, I get the first error; when placed in the
pythonscript folder, I get the second error. The difference, one
contains MEL scripts, typically, the other Python. And if the
script doesn't have a import command ?
I've placed other Python scripts in the path which is in my
environment variable, and the scripts worked, if the script
doesn't require
On Sunday, October 18, 2015 at 1:02:57 AM UTC-4, Christopher. wrote:
I'm going to check over the paths once again, maybe something
is conflicting.
On Sunday, October 18, 2015 at 12:04:41 AM UTC-4, Chris Lesage
wrote:
I imagine you are trying to call the script name and not
importing it first.
Justin is asking you to post *exactly what are you are
trying to do*, what code you are trying to execute. Please
don't make people on this list try to guess what you are
doing with hypothetical questions. This disrespects the
time and knowledge of the people you are calling on.
Don't say "when running the script command". *Paste
exactly what you are trying to execute.
*
On Sat, Oct 17, 2015 at 11:51 PM, Justin Israel
<[email protected]> wrote:
On Sun, Oct 18, 2015 at 4:36 PM Crest Christopher
<[email protected]> wrote:
Justin Israel wrote:
On Sun, 18 Oct 2015 1:56 PM Christopher.
<[email protected]> wrote:
General question about scripts, some scripts
tell you to place them in your python
directory, whether that is your Maya default
installation directory or a custom directory
set forth by your maya env variable file. At
the moment my scripts are all throw in a
custom python scripts folder, quite messy, I
have begun placing the scripts within the
python scripts folder, but within a
respectful directory for organization, and
also for easy upgrading of scripts, maybe
some of you do this as well ?
They don't have to specifically be placed in
Maya's python locations. They just need to be in
the PYTHONPATH by some means. Like you said, this
may have been extended via the Maya.env or
otherwise.
Since beginning to do this, I get when
running the script command, whatever that may
be for a particular script; I get the
following error; *<script name> is not
defined error* ?
Is this the actual python error? What were you
trying to execute, and where was it located on
your file system?
This is the actual error, although the script is
not called <script name> you knew that, that is
strictly a placeholder for the actual script name.
I placed the script in my pythonscripts path and I
get that error, does it matter if the script is
within a folder in the pythonscripts path ?
Again... what exactly were you trying to execute?
Where does this script live on the filesystem?
If you are seeing that error, then something is
incorrect in your configured PYTHONPATH. If you are
placing scripts into sub-directories of your target
PYTHONPATH location, make sure you are including empty
__init__.py files in each one. These are required in
order to indicate to the python import mechanism that
it should traverse into these directories to treat
them as packages.
--
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
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/5b6513aa-f432-4f3a-8ffa-96356d9f79ea%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/5b6513aa-f432-4f3a-8ffa-96356d9f79ea%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 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/8SgJdsUZ0b8/unsubscribe.
To unsubscribe from this group and all its
topics, send an email to
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2bArC-iy8-JfZH7vzGzke84TOCpi2%2BjDLp88q5kbmn%3DQ%40mail.gmail.com
<https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2bArC-iy8-JfZH7vzGzke84TOCpi2%2BjDLp88q5kbmn%3DQ%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
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/562313CA.4040005%40gmail.com
<https://groups.google.com/d/msgid/python_inside_maya/562313CA.4040005%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
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3Z2W6KYpC-%2BZJkdh%2BRSuKrJ5pKZdJTZzZ632%2BtN3KPkw%40mail.gmail.com
<https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3Z2W6KYpC-%2BZJkdh%2BRSuKrJ5pKZdJTZzZ632%2BtN3KPkw%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 [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/622fb20f-75ee-4dc5-804d-45959732860e%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/622fb20f-75ee-4dc5-804d-45959732860e%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 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/8SgJdsUZ0b8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
[email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA22ecQp2Gjc4emM9AgjsMEr05TaSVU%2B6vahUb%2BBon9hoQ%40mail.gmail.com
<https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA22ecQp2Gjc4emM9AgjsMEr05TaSVU%2B6vahUb%2BBon9hoQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.