I obtain same result without spaces ( works on console, but not on blender console )<br><br>Julien<br><br><div class="gmail_quote">On Sun, Oct 17, 2010 at 20:24, Martin Poirier <span dir="ltr"><<a href="mailto:theeth@yahoo.com">theeth@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top">
Not sure if that's actually an error, but the Py documentation on relative import doesn't mention that spaces are permitted between the leading dots and the module name.<br><br>Can you try if changing this:<br><br>
from .. class3 import Class3<br><br>to this:<br><br>from ..class3 import Class3<br><br>changes anything?<br><br>Martin<br><br>--- On <b>Sun, 10/17/10, Revue de Libre <i><<a href="mailto:revuedelibre@gmail.com" target="_blank">revuedelibre@gmail.com</a>></i></b> wrote:<br>
<blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Revue de Libre <<a href="mailto:revuedelibre@gmail.com" target="_blank">revuedelibre@gmail.com</a>><br>Subject: Re: [Bf-python] Blender 2.54 Python API<br>
To: "Blender Foundation Python list" <<a href="mailto:bf-python@blender.org" target="_blank">bf-python@blender.org</a>>, <a href="mailto:bf-committers@blender.org" target="_blank">bf-committers@blender.org</a><br>
Received: Sunday, October 17, 2010, 1:41 PM<div><div></div><div class="h5"><br><br><div>Hello,<br><br>Here is a way to reproduce my problem ( see
tgz in attachment ) with blender console :<br><br>On my console ( Ubuntu 10.04 ) :<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
$python3.1<br>Python 3.1.2 (r312:79147, Apr 15 2010, 12:35:07) <br>[GCC 4.4.3] on linux2<br>Type "help", "copyright", "credits" or "license" for more information.<br>>>> import sys<br>
>>> sys.version_info<br>sys.version_info(major=3, minor=1, micro=2, releaselevel='final', serial=0)<br>>>> sys.path.append('/home/ju/Bureau/test_blender')<br>>>> import test_module<br>
>>><br></blockquote><div><br>--> No error<br><br> On blender console ( r32528 ) :<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
* Python Interactive Console 3.1.2 (r312:79147, Apr 15 2010, 12:51:29) [GCC 4.4.3] *<br>Command History: Up/Down Arrow<br>Cursor: Left/Right Home/End<br>Remove: Backspace/Delete<br>Execute: Enter<br>
Autocomplete: Ctrl+Space<br>Ctrl +/- Wheel: Zoom<br>Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bgl, blf, mathutils, geometry<br><br> WARNING!!! Blender 2.5 API is subject to change, see API reference for more info.<br>
<br>>>> import sys<br>>>> sys.version_info<br>sys.version_info(major=3, minor=1, micro=2, releaselevel='final', serial=0)<br><br>>>> sys.path.append('/home/ju/Bureau/test_blender')<br>
>>> import test_module<br>Traceback (most recent call last):<br> File "<blender_console>", line 1, in <module><br> File "/home/ju/Bureau/test_blender/test_module/__init__.py", line 1, in <module><br>
from . class1 import Class1<br> File "/home/ju/Bureau/test_blender/test_module/class1.py", line 1, in <module><br> from . directory1.class2 import Class2<br> File "/home/ju/Bureau/test_blender/test_module/directory1/class2.py", line 1, in <module><br>
from .. class3 import Class3<br>ImportError: No module named class3<br><br>>>> <br></blockquote><div><br>Can anybody tell me if this error can be reproduced -- and how to solve it ?<br><br>Thanks,<br><br>Julien<br>
<br> <br></div></div>On Tue, Oct 12, 2010 at 13:26, Marc Weber <<a rel="nofollow" href="http://mc/compose?to=marco-oweber@gmx.de" target="_blank">marco-oweber@gmx.de</a>> wrote:<br>> What else can you try?<br>> - use strace grepping for the plugin name to see where the filesystem is being accessed.<br>
> - check known env vars such as PYTHON_SITE and PYTHONPATH (but they should<br>> build up the sys.path)<br>> - check that both python versions are the same. So check against which pythnon<br>> version blender was compiled.<br>
><br>> That's all I can help. I'm not a Python guru. If you really can't find a way to<br>> debug it I can try reproducing your bug here on my system.<br>><br>> Marc Weber<br>> _______________________________________________<br>
> Bf-python mailing list<br>> <a rel="nofollow" href="http://mc/compose?to=Bf-python@blender.org" target="_blank">Bf-python@blender.org</a><br>> <a rel="nofollow" href="http://lists.blender.org/mailman/listinfo/bf-python" target="_blank">http://lists.blender.org/mailman/listinfo/bf-python</a><br>
><br><br><br><br><br>
</div><br></div></div>-----Inline Attachment Follows-----<div class="im"><br><br><div>_______________________________________________<br>Bf-python mailing list<br><a href="http://mc/compose?to=Bf-python@blender.org" target="_blank">Bf-python@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-python" target="_blank">http://lists.blender.org/mailman/listinfo/bf-python</a><br></div></div></blockquote></td></tr></tbody></table><br><br>_______________________________________________<br>
Bf-python mailing list<br>
<a href="mailto:Bf-python@blender.org">Bf-python@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-python" target="_blank">http://lists.blender.org/mailman/listinfo/bf-python</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Julien DUROURE<br><br>84 chemin de Cailhabat<br>31860 Labarthe Sur Lèze<br><br>06 09 40 42 97 <br><br>