Wed, Nov 27, 2:12 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 27 2:10 pm)



Subject: Pro Pack Python Script errors


Dave ( ) posted Thu, 15 August 2002 at 11:03 AM · edited Sat, 23 November 2024 at 9:12 PM

Maybe one of you gurus out there can help. I was attempting to run the compress script from poser pro pack and I get this error: Traceback (innermost last): File "", line 210, in ? AttributeError: AppLocation What the heck does that mean? I have Poser on my D drive and not my C. It was also originally under Metacreations and not Curious Labs. What can I do to fix this glitch? I need to compress some files because my hard drive space is dwindling away. Thanks, Dave


ockham ( ) posted Thu, 15 August 2002 at 11:56 AM

Hmm. I took a look at the relevant functions, including a peek inside Poser itself, and didn't see any hard-wired references to C: or to a CuriousLabs or MetaCreations directory. My own Poser directory is in a non-standard place, and I've used AppLocation successfully. One possibility: I've seen "attribute error" in file-related Python functions when I tried to use an empty string.... but that was in my own scripting which wasn't necessarily written right. You might see if you're leaving a blank unfilled?

My python page
My ShareCG freebies


Dave ( ) posted Thu, 15 August 2002 at 12:00 PM

I cant even get the script to run from within Poser. I've tried using the Script Tool Bar and also doing it from the FileRune Python Script command. Everytime it kicks back that error without pulling anything up to enter any information. Could it be a conflict in versions of Python? I do have a version that I dowloaded to test a script for a friend (back before I got the Pro pack)? Thanks, David


bushi ( ) posted Thu, 15 August 2002 at 12:11 PM

I looked at the compression script. One thing I noticed is there is no import statement for the Poser methods. This is most likely the problem since you have Poser installed on the D: drive. Try this:

Open the script in a text editor
Near the top of the script you'll see two import statements -

import gzip
import string

Add a third import statement -

import poser

Save the script under a new name with the .py extention and try it.

This should do the trick. If not let me know.


Dave ( ) posted Thu, 15 August 2002 at 12:21 PM

Nope that didnt do it. All it did was move the error down one line number with the same error message. Any help will be greatly appreciated Bushi. Thanks, David


brian71us ( ) posted Thu, 15 August 2002 at 12:24 PM

I have used the compression script on my G: drive without incident. Do you have the latest service release installed? Brian


stewer ( ) posted Thu, 15 August 2002 at 12:25 PM

Bushi, you beat me again ;) "import Poser" should do it.


bushi ( ) posted Thu, 15 August 2002 at 12:56 PM

Brian's suggestion is a good one. Also, as long as you didn't install the DL'd Python in the Poser path that shouldn't be a problem. Have you tried other scripts and have they worked correctly?


Dave ( ) posted Thu, 15 August 2002 at 12:57 PM

No I dont have the latest service release installed. And no the "import Poser" command didnt fix the problem. Does it matter if Poser is capitalized or not? Some scripts work fine but others dont. This one does not. I've been looking at the scripts to see if there was a similar theme or something so I could determine why one script works and the other doesnt. Other than a migraine I havent come up with anything. Thanks, David


bushi ( ) posted Thu, 15 August 2002 at 12:59 PM

Yes, caps do count. If you could list some of the scripts by working and not working, I'd take a look too.


williamsheil ( ) posted Thu, 15 August 2002 at 2:28 PM

You may also want to check your registry (search for "Poser" in regedit) to see if your OS still knows where Poser is. This maybe where Python is getting the incorrect path. Bill


Dave ( ) posted Thu, 15 August 2002 at 2:48 PM

Ok did the search in regedit. Only thing that came up was in "My ComputerHKEY_CLASSES_ROOT*.pzr. And then it sais some icon with "ab" in it then (Default) then "PoserFile" in the window to the right of the tree. What should it have found? Thanks, David


stewer ( ) posted Thu, 15 August 2002 at 4:23 PM

Install the latest service release, it improves Python a lot and adds a few new API calls. Then, the additional Python installation could have set some Python related environment variables. Open a DOS-box and enter "set". It will now dump quite a few lines with environment variables. If you see a variable called PYTHONHOME that does not point to Poser/Runtime/Python, you'll have to change it. How to do that depends on your operating system version, see the online help.


Dave ( ) posted Thu, 15 August 2002 at 8:33 PM

Ok what if there isnt a variable called PYTHONHOME? I'm running windows98se. What do I need to do? What should the line read? Is it PYTHONHOME=D:Program FilesCurious LabsPoser 4Runtime? And where do I enter this? Is it a line in the autoexec.bat file? I wonder why some python scripts run but others do not. I was gonna paste what was listed when I typed "set" but I'm not sure how to do that either. Thanks, David


stewer ( ) posted Fri, 16 August 2002 at 5:46 AM

It should be OK when it's not there,I think you should try SR3 first. Did adding "import Poser" result in a different error message or did you get the same result?


williamsheil ( ) posted Fri, 16 August 2002 at 8:27 AM

In my registry I have a pathname entry under "My ComputerHKEY_LOCAL_MACHINESOFTWAREClassesApplicationsPoser.exeshellopencommand". On the find mode you have to press F3 to repeat the search as it only gives you one find at a time, more like a document search than an explorer search. Bill


edversyp ( ) posted Mon, 12 April 2004 at 1:06 PM

Hi everyone, I have similar problems with some Python scripts giving me error messages such as File"", line xx, in ? and AttributeError... Where should I post my questions on that matter or to who should I adress them? Hope to get some answer. Thanks and regards. Eddy


nruddock ( ) posted Mon, 12 April 2004 at 1:53 PM

Attached Link: http://www.renderosity.com/messages.ez?ForumID=12390

Try the Python scripting forum (link attached). It's worth taking a look through previous posts to see if this is a known problem. Otherwise, be sure to give plenty of relevant details, e.g. Type of computer, OS etc., Poser version, what script if one supplied with Poser or if it's one of your own post the script, what the script is supposed to be doing, what was selected when you got the error, have you been able to run this script before without problems, if so something about what might have changed / is different since it last worked. You don't need to give this all at once, but the more you can helps.


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.