Yet Another Yable Newbie Problem...

Hello,

I’m trying to make Yable work on my Win2K machine, but I don’t know what I’m doing wrong. After I’ve read the topic Yable for Blender 2.28 ??, I downloaded yablex-20030814-228.zip. I also downlaoded and installed Python 2.3 - I didn’t find any instruction about what python version is needed, so I thought that the last stable should be ok.

Now when I open the script in blender and press ALT-P in Blender 2.28 here’s what I get:

Using a clean Global Dictionary.
Run Python script "yable.py" ...
warning: name 'sunbg' is used prior to global declaration
[... lots of warnings: name 'xxx' is used prior to global declaration ...]
warning: name 'Layersw' is used prior to global declaration
ImportError: No module named warnings
Can't get traceback
'import site' failed; use -v for traceback

I also tried other versions of Yable (eg. 0.30) within other versions of Blender (eg. 2.23), but nothing worked…

PYTHON SCRIPT ERROR:
Traceback (most recent call last):
  File "yable-0.30.py", line 33, in ?
ImportError: No module named os

What am I doing wrong?

Please help. :wink:

Gabriel

I have the same list of warnings when the script is launched the first time. But not when i restart twice.

No warning in this version:
http://www.zoo-logique.org/3D.Blender/scripts_python/yablex-20030820-228.zip

I also tried other versions of Yable (eg. 0.30) within other versions of Blender (eg. 2.23), but nothing worked…

PYTHON SCRIPT ERROR:
Traceback (most recent call last):
  File "yable-0.30.py", line 33, in ?
ImportError: No module named os

What am I doing wrong?

Please help. :wink:

Gabriel

Your python path is not correct, look at this page :
https://blenderartists.org/forum/viewtopic.php?t=7723

Thanks for your fast answer! But I still wasn’t able to make it work:

I downloaded your new script (20030820), put it somewhere in my blender folders, imported it into my blender file. Then I changed the YABLEROOT to point to the folder containing my script, the VIEWERAPP to my image viewing program, and CRAFTERFILE to the material file in my crafter dir. And I saved all that in a copy of the original file.

I also modified the PYTHONPATH of my system environment variables to match the “C:\Program Files\Python” path:
C:\Progra~1\Python;C:\Progra~1\Python\DLLs;C:\Progra~1\Python\Lib;C:\Progra~1\Python\Lib\lib-tk

This seems to work when I try it in my Python console:

Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', 'C:\\Progra~1\\Python', 'C:\\Progra~1\\Python\\DLLs', 'C:\\Progra~1\\Python
\\Lib', 'C:\\Progra~1\\Python\\Lib\\lib-tk', 'C:\\WINNT\\system32\\python23.zip'
, 'C:\\Program Files\\Python\\DLLs', 'C:\\Program Files\\Python\\lib', 'C:\\Prog
ram Files\\Python\\lib\\plat-win', 'C:\\Program Files\\Python\\lib\\lib-tk', 'C:
\\Program Files\\Python', 'C:\\Program Files\\Python\\lib\\site-packages']
>>>

Then I rebooted my computer, reopened my blender file and pressed ALT-P. Here’s the output of the Blender console:
When I start Blender and open my file:

C:\Progra~1\Python\Lib\os.py:282: Warning: 'yield' will become a reserved keywor
d in the future
'import site' failed; use -v for traceback
no font found for international support

When I presse ALT-P:

Using a clean Global Dictionary.
Run Python script "YableX" ...
C:\Progra~1\Python\Lib\os.py:282: Warning: 'yield' will become a reserved keywor
d in the future
Traceback (most recent call last):
  File "YableX", line 49, in ?
  File "C:\Progra~1\Python\Lib\os.py", line 282
    yield top, dirs, nondirs
            ^
SyntaxError: invalid syntax
C:\Progra~1\Python\Lib\os.py:282: Warning: 'yield' will become a reserved keywor
d in the future
'import site' failed; use -v for traceback

Should I use an older version of Python (instead of Python 2.3)? But if yes, which one?

Gabriel

The version of python that Blender 2.28 is compiled with is 2.2. I don’t know if it makes a difference, but I would assume using Python 2.2 would be the best for compatibility purposes.

I downloaded python 2.2.3 and it works!!! Thank’s a lot to both of you for your great help! :smiley:

Gabriel