The document the error spit out has some suggestions:
http://www.python.org/dev/peps/pep-0263/

I've never run into this, but maybe if you put that "coding" statement
in there it will work. I don't know why it works on some versions and
not others. Perhaps later versions of the interpreter know how to
handle it.


On 4/8/09, ryant <[email protected]> wrote:
>
> Do you know how to make a script that has the copyright system in it
> work? I solved the problem by removing the symbol.
>
> On Apr 7, 7:55 pm, Ben Barker <[email protected]> wrote:
>> AFAIK "\\xa9" is the copyright symbol. If encoding isn't specified it may
>> not know how to interpret this symbol if it exists in your code, probably
>> in
>> the docs.
>>
>>
>>
>> On Tue, Apr 7, 2009 at 5:40 PM, ryant <[email protected]> wrote:
>>
>> > Well that still helps me, I can specify that it doesnt work in maya
>> > 8.5 so no one gets frustrated trying to use it. I dont have a way of
>> > testing it on 8.5 so I am kind of stuck there. It might be that a few
>> > functions needed to make the plugin were not exposed in 8.5 to Python.
>> > 8.5 was the first implementation of the language so they still were
>> > working some issues out in that version of Maya.
>>
>> > They still have the 8.5 docs on autodesk.com so maybe I can figure out
>> > which function is causing that error.
>>
>> > RyanT
>>
>> > On Apr 7, 5:22 pm, Richard Kazuo <[email protected]> wrote:
>> > > Hi Ryan, I still got the same error using Maya 8.5.
>>
>> > > But, it works fine in my Mayas 2008/2009... maybe it's something that
>> > just
>> > > doesn't work in 8.5.
>>
>> > > Sorry I can't be more helpful, I'm still very raw on plugin coding in
>> > > Python. But this poseDeformer adaptation to a scripted plugin really
>> > > interests me!
>>
>> > > Richard
>>
>> > > On Tue, Apr 7, 2009 at 3:03 PM, ryant <[email protected]> wrote:
>>
>> > > > Try and re-download it off my site. I found this error:
>>
>> > > > // Error: file: C:/Program Files/Autodesk/Maya2008/scripts/others/
>> > > > pluginWin.mel line 638: ("Non-ASCII character '\\xa9' in file C:/
>> > > > Documents and Settings/rtrowbridge/Desktop/poseReader.py on line 29,
>> > > > but no encoding declared;
>> > > > seehttp://www.python.org/peps/pep-0263.html
>> > > > for details", ('C:/Documents and Settings/rtrowbridge/Desktop/
>> > > > poseReader.py', 28, 0, None))
>> > > > #   File "C:/Documents and Settings/rtrowbridge/Desktop/
>> > > > poseReader.py", line 28
>> > > > #  SyntaxError: ("Non-ASCII character '\\xa9' in file C:/Documents
>> > > > and
>> > > > Settings/rtrowbridge/Desktop/poseReader.py on line 29, but no
>> > > > encoding
>> > > > declared; seehttp://www.python.org/peps/pep-0263.htmlfordetails";,
>> > > > ('C:/Documents and Settings/rtrowbridge/Desktop/poseReader.py', 28,
>> > > > 0,
>> > > > None)) //
>>
>> > > > Right before I distributed the script I added some copyright code
>> > > > that
>> > > > Michael Comet had in his code. Well apparently the (c) symbol was
>> > > > making the script fail to load of all things. See if it works now.
>>
>> > > > Steps:
>>
>> > > > Load the plugin, source the MEL script, execute "poseReaderUI();",
>> > > > then select a transform of some sort like a cube and click "rig
>> > > > selected objects..." like you did. Give this a test and tell me if
>> > > > it
>> > > > works for you now. I just tested on Maya 2008, I dont have access to
>> > > > 8.5 so hopefully this will work. Thanks for the help of pointing out
>> > > > the bugs.
>>
>> > > > RyanT
>> > > > Technical Artist
>> > > >www.rtrowbridge.com/blog
>> > > > NaughtyDog Inc.
>>
>> > > > On Apr 7, 7:18 am, Richard Kazuo <[email protected]> wrote:
>> > > > > Hey Ryan,
>>
>> > > > > Sorry, I forgot to test the script, but couldn't get it to work
>> > either.
>> > > > :(
>> > > > > I created a cube, loaded the .PY, run the MELscript and got the
>> > following
>> > > > > error:
>>
>> > > > > // Error: state
>> > > > > # Traceback (most recent call last):
>> > > > > #   File ".../plug-ins/poseReader.py", line 493, in compute
>> > > > > #     hNodeState = data.inputValue( self.state )
>> > > > > #   File
>>
>> > "C:\engserv\rbuild\164\build\wrk\optim\runTime\Python\Lib\site-packages\maya\OpenMayaMPx.py",
>> > > > > line 1676, in <lambda>
>> > > > > #   File
>>
>> > "C:\engserv\rbuild\164\build\wrk\optim\runTime\Python\Lib\site-packages\maya\OpenMayaMPx.py",
>> > > > > line 31, in _swig_getattr
>> > > > > # AttributeError: state //
>>
>> > > > > Just clicked on the cube and then in the UI button "Rig Selected
>> > > > Objects"...
>> > > > > Is there more to it? Joints also give the same error message.
>>
>> > > > > A screenshot of the erorr is attached on this email.
>>
>> > > > > Richard (running Maya 8.5 x32)
>>
>> > > > > On Mon, Apr 6, 2009 at 10:48 PM, ryant <[email protected]>
>> > wrote:
>>
>> > > > > > Ahh I need to add a readme file to the zip.
>>
>> > > > > > I have not tested it working with the poseDeformer, which is a
>> > > > > > good
>> > > > > > point I should make sure it works with it. We have used the
>> > poseReader
>> > > > > > in rigs at my work but just on their own as a utility node. If
>> > > > > > you
>> > > > > > create a poseReader on its own in a new scene using the mel
>> > > > > > script
>> > I
>> > > > > > enclosed does it work? I will look into why its failing to work
>> > with
>> > > > > > the poseDeformer.
>>
>> > > > > > RyanT
>> > > > > > Technical Artist
>> > > > > >www.rtrowbridge.com/blog
>> > > > > > NaughtyDog Inc.
>>
>> > > > > > On Apr 6, 7:39 am, Richard Kazuo <[email protected]> wrote:
>> > > > > > > Hey man, congratulations for your initiative! This should be
>> > REALLY
>> > > > > > > helpfull! PoseDeformer is awesome.
>>
>> > > > > > > Did a quick test on a poseDeformed rig and got the following
>> > error:
>>
>> > > > > > > // Error: (kFailure): Object does not exist
>> > > > > > > # Traceback (most recent call last):
>> > > > > > > #   File ".../Maya8.5/plug-ins-x64/poseReader.py", line 768,
>> > > > > > > in
>> > draw
>> > > > > > > #     nDrawDetail = plugDrawDetail.asInt()
>> > > > > > > #   File
>>
>> > "G:\engserv\rbuild\175\build\wrk\optim\runTime\Python\Lib\site-packages\maya\OpenMaya.py",
>> > > > > > > line 7940, in asInt
>> > > > > > > # RuntimeError: (kFailure): Object does not exist //
>>
>> > > > > > > Maya automatically loaded the .MLL for the original deformer
>> > > > > > > and
>> > > > reader,
>> > > > > > > then I manually unloaded the .MLL reader and loaded the .PY
>> > reader,
>> > > > to
>> > > > > > get
>> > > > > > > this error.
>>
>> > > > > > > Am I doing something wrong?
>> > > > > > > BTW, I'm using Maya 8.5 x64!
>>
>> > > > > > > Richard
>>
>> > > > > > > On Sat, Apr 4, 2009 at 3:35 PM, ryant <[email protected]>
>> > wrote:
>>
>> > > > > > > > I am finally posting the poseReader plug-in I converted. You
>> > can
>> > > > find
>> > > > > > > > it in the downloads section here:
>>
>> > > > > > > >http://www.rtrowbridge.com/blog/downloads/
>>
>> > > > > > > > It was originally written by Michael B. Comet so the concept
>> > was
>> > > > > > > > created by him and he deserves the credit. I converted his
>> > > > > > > > C++
>> > code
>> > > > > > > > into a Maya Python API plug-in. Hopefully with no bugs, but
>> > there
>> > > > very
>> > > > > > > > well could be some still lurking. If you find any feel free
>> > > > > > > > to
>> > tell
>> > > > me
>> > > > > > > > and I will look into fixing them. I think this was a good
>> > exercise
>> > > > in
>> > > > > > > > converting a plug-in. It helped me with understanding better
>> > how to
>> > > > > > > > read C++ into Python. Not that I will be doing that often
>> > > > > > > > but
>> > it is
>> > > > > > > > still a good learning experience.
>>
>> > > > > > > > This changes the poseReader from being a plug-in that must
>> > > > > > > > be
>> > > > compiled
>> > > > > > > > for every version of Maya to a plug-in that will work on any
>> > > > platform
>> > > > > > > > and for any version of Maya using Python. That’s pretty cool
>> > > > > > > > I
>> > > > think.
>>
>> > > > > > > > Feel free to pick it apart and learn from it.
>>
>> > > > > > > > Cheers,
>> > > > > > > > RyanT
>> > > > > > > > Technical Artist
>> > > > > > > >www.rtrowbridge.com/blog
>> > > > > > > > NaughtyDog Inc.
>>
>> > > > >  poseReaderError.jpg
>> > > > > 140KViewDownload
>>
>> --
>> -Ben Barker
> >
>


-- 
-Ben Barker

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to