Hello,
 
if interface in interfaces:
changed.
 
next messages are :
-----
C:\Python33\sample\pythoncgkit\chapter1>render.py -r3delight demo1.py
Exporting main.rib...
1 passes...
Traceback (most recent call last):
  File "C:\Python33\Scripts\render.py", line 361, in <module>
    render.run()
  File "C:\Python33\lib\site-packages\cgkit\tool.py", line 198, in run
    self.action()
  File "C:\Python33\Scripts\render.py", line 237, in action
    bakestvar = bakestvar
  File "C:\Python33\lib\site-packages\cgkit\cmds.py", line 981, in save
    exp.exportFile(os.path.basename(filename), **options)
  File "C:\Python33\lib\site-packages\cgkit\ribexport.py", line 280, in exportFi
le
    rpass.doPass(frameNr)
  File "C:\Python33\lib\site-packages\cgkit\ribexport.py", line 832, in doPass
    lid = self.exporter.applyLightSource(lgt)
  File "C:\Python33\lib\site-packages\cgkit\ribexport.py", line 364, in applyLig
htSource
    explgt.shaderSource())
  File "C:\Python33\lib\site-packages\cgkit\ribexport.py", line 557, in writeSha
der
    f = file(filename, "wt")
NameError: global name 'file' is not defined
------
 
Thank you
Yuichirou Yokomakura
 

 
----- Original Message -----
From: Matthias Baas <matthias.baas@gmail.com>
To: makura <y_makura@yahoo.co.jp>; cgkit user discussions <cgkit-user@lists.sourceforge.net>
Date: 2014/7/3, Thu 06:10
Subject: Re: [cgkit-user] Window of viewer.py has closed.

On 02.07.14 18:48, makura wrote:
> C:\Python33\sample\pythoncgkit\chapter1>render.py -r3delight demo1.py
> [...]
>  File "C:\Python33\lib\site-packages\cgkit\protocols.py", line 53, in adapt
>    if interfaces.has_key(interface):
> AttributeError: 'dict' object has no attribute 'has_key'

> If I add  ".encode("cp932")",Where should I write in it at?
> do viewer.py and render.py work?

I think the problem rather is that in Python 3, the dict object doesn't
have a has_key() method anymore. That should be written as:

  if interface in interfaces:

Could you try changing that line and see if it then works again?
Let me know if that fixes it.

Cheers,

Matthias