POV-Ray : Newsgroups : povray.unix : problems with python-script Server Time
23 Dec 2024 12:57:50 EST (-0500)
  problems with python-script (Message 1 to 3 of 3)  
From: ganymed
Subject: problems with python-script
Date: 28 Aug 2002 01:42:53
Message: <3d6c62dc@news.povray.org>
I was recommended a python-script ( 
http://www.janw.gothere.uk.com/Download/Python/povexport.py ) to export the 
objects to povray 
( http://www.janw.gothere.uk.com/ )
But unfortunately always an error is displayed in the bash when I start the 
script (P+ALT) in the blender-text-editor:

---------------------------------------------------------------------------
PYTHON SCRIPT ERROR:
Traceback (most recent call last):
  File "povexport.py", line 364, in ?
AttributeError: getCurrentScene
---------------------------------------------------------------------------
I think I have followed the instructions on the web-page correctly. (See 
Usage && Install/Unix) 
Has anyone an idea what the problem could be?

I entered the following lines in the blender-text-editor: (See Jan 
Walter`Blender page - Installation-Unix)
import sys
print sys.path

Output in the bash:

['/usr/lib/python2.0/', '/usr/local/lib/python2.0/', 
'/home/strubi/develop/lib/linux-glibc2.1.3-i386/python/lib/python2.0/
plat-linux2', 
'/home/strubi/develop/lib/linux-glibc2.1.3-i386/python/lib/python2.0/
lib-tk', 
'/home/strubi/develop/lib/linux-glibc2.1.3-i386/python/lib/lib-dynload', 
'/home/ganymed/blender-creator-2.23-linux-glibc2.1.2-i386-static/.', '']

(Why strubi? There is no user strubi on my system! Is this the cause for 
the problem? How can I change that?)

Besides:
>python
>>>import sys
>>>print sys.path

Output in the bash:
['', '/usr/local/Python-2.0', '/usr/local/lib/python2.0', 
'/usr/local/Python-2.0/moreDirectories', '/usr/lib/python2.2', 
'/usr/lib/python2.2/plat-linux-i386', '/usr/lib/python2.2/lib-tk', 
'/usr/lib/python2.2/lib-dynload', '/usr/lib/python2.2/site-packages']


thanks for your responses!

Ps.: I use blender-creator-2.23-linux-glibc2.1.2-i386-static // 
Mandrake 8.2


Post a reply to this message

From: Roz
Subject: Re: problems with python-script
Date: 28 Aug 2002 23:27:09
Message: <3D6D94D9.9040602@netscape.net>
ganymed wrote:
> I was recommended a python-script ( 
> http://www.janw.gothere.uk.com/Download/Python/povexport.py ) to export the 
> objects to povray 
> ( http://www.janw.gothere.uk.com/ )
> But unfortunately always an error is displayed in the bash when I start the 
> script (P+ALT) in the blender-text-editor:
> 
> ---------------------------------------------------------------------------
> PYTHON SCRIPT ERROR:
> Traceback (most recent call last):
>   File "povexport.py", line 364, in ?
> AttributeError: getCurrentScene
> ---------------------------------------------------------------------------
> I think I have followed the instructions on the web-page correctly. (See 
> Usage && Install/Unix) 
> Has anyone an idea what the problem could be?

It's been a while since I've messed around with this script and Blender. I
had it working back then but have since gotten a newer verion of Blender 
(2.22)
and a newer version of Python (2.2). So I tried out the script tonight 
and did
run into a problem, just not exactly the same as yours. However, the
workaround I did may also solve your problem.

> Output in the bash:
> 
> ['/usr/lib/python2.0/', '/usr/local/lib/python2.0/', 
> '/home/strubi/develop/lib/linux-glibc2.1.3-i386/python/lib/python2.0/
> plat-linux2', 
> '/home/strubi/develop/lib/linux-glibc2.1.3-i386/python/lib/python2.0/
> lib-tk', 
> '/home/strubi/develop/lib/linux-glibc2.1.3-i386/python/lib/lib-dynload', 
> '/home/ganymed/blender-creator-2.23-linux-glibc2.1.2-i386-static/.', '']
> 
> (Why strubi? There is no user strubi on my system! Is this the cause for 
> the problem? How can I change that?)

I also had the strubi message. I suspect some hard coding in the
Blender program. It seems to expect to find python modules in
/usr/lib/python2.0 (and other amazing paths ;) and isn't trying to
look in /usr/lib/python2.2 which is where I needed it to look. I'm sure
there's more elegant solutions but I went brute force and moved the
/usr/lib/python2.0 one to a save directory then made a symlink for
python2.0 to point to python2.2 like this:

ln -s /usr/lib/python2.2 /usr/lib/python2.0

I then followed the same instructions you did, exported the chevy.blend
sample file, rendered it in POV and voila!

Hope this works for you too!

-Roz


Post a reply to this message

From: ganymed
Subject: Re: problems with python-script
Date: 29 Aug 2002 02:28:32
Message: <3d6dbf0f@news.povray.org>
Roz wrote:

> ganymed wrote:
>> I was recommended a python-script (
>> http://www.janw.gothere.uk.com/Download/Python/povexport.py ) to export
>> the objects to povray
>> ( http://www.janw.gothere.uk.com/ )
>> But unfortunately always an error is displayed in the bash when I start
>> the script (P+ALT) in the blender-text-editor:
>> 
>> 
---------------------------------------------------------------------------
>> PYTHON SCRIPT ERROR:
>> Traceback (most recent call last):
>>   File "povexport.py", line 364, in ?
>> AttributeError: getCurrentScene
>> 
---------------------------------------------------------------------------
>> I think I have followed the instructions on the web-page correctly. (See
>> Usage && Install/Unix)
>> Has anyone an idea what the problem could be?
> 
> It's been a while since I've messed around with this script and Blender. I
> had it working back then but have since gotten a newer verion of Blender
> (2.22)
> and a newer version of Python (2.2). So I tried out the script tonight
> and did
> run into a problem, just not exactly the same as yours. However, the
> workaround I did may also solve your problem.
> 
>> Output in the bash:
>> 
>> ['/usr/lib/python2.0/', '/usr/local/lib/python2.0/',
>> '/home/strubi/develop/lib/linux-glibc2.1.3-i386/python/lib/python2.0/
>> plat-linux2',
>> '/home/strubi/develop/lib/linux-glibc2.1.3-i386/python/lib/python2.0/
>> lib-tk',
>> '/home/strubi/develop/lib/linux-glibc2.1.3-i386/python/lib/lib-dynload',
>> '/home/ganymed/blender-creator-2.23-linux-glibc2.1.2-i386-static/.', '']
>> 
>> (Why strubi? There is no user strubi on my system! Is this the cause for
>> the problem? How can I change that?)
> 
> I also had the strubi message. I suspect some hard coding in the
> Blender program. It seems to expect to find python modules in
> /usr/lib/python2.0 (and other amazing paths ;) and isn't trying to
> look in /usr/lib/python2.2 which is where I needed it to look. I'm sure
> there's more elegant solutions but I went brute force and moved the
> /usr/lib/python2.0 one to a save directory then made a symlink for
> python2.0 to point to python2.2 like this:
> 
> ln -s /usr/lib/python2.2 /usr/lib/python2.0
> 
> I then followed the same instructions you did, exported the chevy.blend
> sample file, rendered it in POV and voila!
> 
> Hope this works for you too!
> 
> -Roz


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.