Re: [cgkit-user] [cgkit-commits] CGkitinfo Error
Brought to you by:
mbaas
|
From: david v. <mis...@ga...> - 2008-10-28 08:12:50
|
Oups... sorry for the commit-mail thing... And thanks Matthias for helping
me on that !
Well, to be exact, i had trouble installing the whole package, as well as
pygame, on my out of the box Osx with apple's compiled 2.5.1 python in it.
The .pkg of both cgkit and pygame didn't want to install because it was
needing a "System Python Install" ... The python installation folder in my
case was
1) /System/Library/Frameworks/Python.framework/Versions/2.5/
and i've seen that the .pkg was installing well with the existence of the
same path without the /System/ on front of it:
2) /Library/Frameworks/Python.framework/Versions/2.5/
this is typically the path where activestate or pythonmac installs when
they're downloaded.
I've noticed something else: installing pyOpenGL, numpy and pyProtocols was
ok with no (visible) problem, and the lib were put by the installer in a
third folder:
3) /Library/Python/2.5/site-packages/
So i had the package of pygame and cgkit extract in the folder #2, and had
to move the files in the folder #3, in order to had it load from the
python console..
I also downloaded the sources from cgkit, just for me to see. And here,
i've noticed two things:
(the python console is fired up from my basic home dir)
First, a simple call from the console to cgkitinfo raise an error:
>>> import cgkitinfo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cgkitinfo
Second, i have neither the viewer.py or the render.py in the freshly ".pkg"
extracted folder in location #2 and copyied in location #3: I can only find
those two files in the source archive. So i just copyied those two files
from the source dir to the dir #3, just to be sure to not exec it from the
source dir (i've also deleted it)
I've made the viewer.py working after modifying the __init__ .py, but for
now the render.py still doesn't work with 3Delight (and a ton of error)
Exporting main.rib...
Traceback (most recent call last):
File "/Library/Python/2.5/site-packages/render.py", line 361, in
<module>
render.run()
File "/Library/Python/2.5/site-packages/cgkit/tool.py", line 198, in
run
self.action()
File "/Library/Python/2.5/site-packages/render.py", line 237, in
action
bakestvar = bakestvar
File "/Library/Python/2.5/site-packages/cgkit/cmds.py", line 981, in
save
exp.exportFile(os.path.basename(filename), **options)
File "/Library/Python/2.5/site-packages/cgkit/ribexport.py", line
170, in exportFile
explgt = protocols.adapt(obj, ILightSource)
File "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx",
line 199, in _speedups.adapt
File "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx",
line 188, in _speedups._adapt
TypeError: exceptions must be strings, classes, or instances, not
AdaptationFailure
... The one with the "C:\cygwin..." worries me a bit as i'm on Osx...
Anyway, with my mod, viewer.py works. for render.py... well you see (and
it's a pitty as i wanted to user cgkit for renderman stuff). Does those
explanation ring the bell ? what have i done wrong ?
Matthias Baas <mat...@gm...> wrote on 27 Oct 2008, 10:59 PM:
Subject: Re: [cgkit-commits] CGkitinfo Error
>Hi David,
>
>first of all, you posted your mail into the commits mailing list which
>is rather meant to receive the automatic svn commit messages. People can
>subscribe to that list if they want to know exactly what modifications
>are done to the code. The list is not meant to be used for discussions,
>this is done in the cgkit-user list instead (I have actually cc'ed to
>the user list instead of the commits list).
>
>david vandergucht wrote:
>> Hi there ! i used CGkit a while ago, on windows. Now i'm back in
>> business, but on OSX with the 2 alpha 8.
>>
>> I've experienced several problem trying to install it on an "out of the
>> box Léopard with Apple's Python" but finally got it. (i will talk about
>> this in another post, just to have your opinion).
>
>I would be interested in hearing about those problems. I'm still running
>Tiger, so unfortunately, I couldn't test cgkit on Leopard yet.
>
>> Anyway, when executing viewer.py, i've noticed some error about
>cgkitinfo:
>>
>> import os.path, cgkitinfo
>>
>> raise an error, cgkitinfo not beeing found as a module. I've made a
>> workaround editing the __init and replacing
>>
>> import cgkitinfo
>>
>> by
>>
>> import cgkit.cgkitinfo as cgkitinfo
>>
>> and that way, i had the viewer launch properly, and be able to see my
>> wonderful bi-color Sphere in Opengl
>>
>> Is this the normal ? and is this the correct way ?
>
>This is odd. The file cgkitinfo.py is part of the cgkit package and as
>it is in the same directory as __init__.py it should be found without
>prepending "cgkit." to it.
>
> From where did you run viewer.py? Could it be that you have still been
>in the root directory of the source archive? In that case, Python would
>pick up the local cgkit directory instead of the installed one and the
>local one might not have had the cgkitinfo module (as this is an
>automatically generated module). If that was the problem, then you
>should just change into another directory and try again.
>
>If that was not the problem, can you please post the entire traceback?
>
>- Matthias -
>
>
-----------------------------------------------------------------------------------------------------------------------
Send big files for free. Simple steps. No registration.
Visit now http://www.nawelny.com
|