Marcus, I assume you are suggesting I change that line ? :-)

Christopher

Marcus Ottosson <mailto:[email protected]>
Wednesday, November 26, 2014 10:57 AM

Ugh, don’t do manual path concatenation! :)

|import os
path = os.path.join(os.environ['HOMEDRIVE'], os.environ['HOMEPATH'])
|

Better yet, use |expanduser|

|import os
path = os.path.expanduser("~")
|

That way it isn’t dependent on Windows.

​




--
*Marcus Ottosson*
[email protected] <mailto:[email protected]>
--
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/CAFRtmOBJ%2Brkthz1%3Dk1pSZMCM%3D6nY_L3CB2Do9q8p2bXq396QZg%40mail.gmail.com <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBJ%2Brkthz1%3Dk1pSZMCM%3D6nY_L3CB2Do9q8p2bXq396QZg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
Crest Christopher <mailto:[email protected]>
Wednesday, November 26, 2014 9:52 AM
Hi, the problem has be solved, thank you, no more error.

What exactly was the problem, it was trying to write to the root drive ?

Christopher

Eduardo Grana <mailto:[email protected]>
Wednesday, November 26, 2014 6:14 AM
Hello Christopher,

try replacing C: (__file__.split('\\')[0]) for you user's home path,
maybe that way you can check if the problem is with writing permissions.
where it says (uistates.py line 9)

class UiStates():
        filename = 'config.uvd'
        path = __file__.split('\\')[0]+'/'

change it to:

class UiStates():
        filename = 'config.uvd'
        #path = __file__.split('\\')[0]+'/'
path = os.environ['HOMEDRIVE']+os.environ['HOMEPATH'].replace('\\','/')+'/'

Cheers,
Eduardo




--
Eduardo Graña
www.eduardograna.com.ar <http://www.eduardograna.com.ar>
--
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/CACt6GrmH0txJWtJbPjk%2ByCQXhhuLZLtHqNRoPwVBmOtCaeD-SA%40mail.gmail.com <https://groups.google.com/d/msgid/python_inside_maya/CACt6GrmH0txJWtJbPjk%2ByCQXhhuLZLtHqNRoPwVBmOtCaeD-SA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
Crest Christopher <mailto:[email protected]>
Wednesday, November 26, 2014 12:47 AM
File A  code - [Link <http://pastebin.com/udHDfZNx#>]
File B code - [Link <http://pastebin.com/nGmNAr86>]

Here are the links to the source !

Christopher
Justin Israel <mailto:[email protected]>
Sunday, November 23, 2014 2:06 PM
Presumably the tool is trying to write out a data file to your C: drive, and does not have permission. Without the link to the source, I can't be sure, but is there an input for telling it where to store this file? Apparently your C: root is not a sufficient location.

--
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/CAPGFgA2jjvMuy642OJ4%2BzgdsfisnWboSVEkRW0Hnk%3DEo%3D4Ho6Q%40mail.gmail.com <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2jjvMuy642OJ4%2BzgdsfisnWboSVEkRW0Hnk%3DEo%3D4Ho6Q%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/547678E2.80805%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to