Can't run Blender scripts

Bug #244787 reported by Nick Grant
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
blender (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: blender

I have been having trouble getting blender's default scripts to run. They work fine in Windows XP but I get an error whenever I try in Ubuntu.

I get an error message saying "Pytthon script error: check console".

The console says something like:

    Traceback (most recent call last):
        File "<string>", line 110 in <module>
    ImportError: No module named BPyMessages

The line # and module name vary depending on which script I try to run, but the module name always seems to start with "BPy".

I have only been having these problems since 2.46 was released. I am running Ubuntu 8.04

Revision history for this message
Michele Giacomoli (michele-giacomoli) wrote :

I have a similar problem with some default python scripts, like Mesh -> "Solid Wireframe"

I'm using Ubuntu Jaunty 9.04 with Blender 2.48a.

I tryed the official version from the official site of the program and it works nicely, so the problem is linked to the Ubuntu package

Ryan Macnish (nisshh)
Changed in blender (Ubuntu):
status: New → Confirmed
status: Confirmed → New
Revision history for this message
Ryan Macnish (nisshh) wrote :

Confirmed on an up-to-date 10.04 i686 install.

$ uname -a
Linux desktop 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 07:54:58 UTC 2010 i686 GNU/Linux

$ apt-cache policy blender
blender:
  Installed: 2.49.2~dfsg-1ubuntu1
  Candidate: 2.49.2~dfsg-1ubuntu1
  Version table:
 *** 2.49.2~dfsg-1ubuntu1 0
        500 http://mirror.aarnet.edu.au/pub/ubuntu/archive/ lucid/universe Packages
        100 /var/lib/dpkg/status

Changed in blender (Ubuntu):
status: New → Confirmed
Revision history for this message
Domino Marama (domino) wrote :

This problem is caused by the layout of the scripts directory which prevents scripts from importing functions from any of the standard Blender scripts. I've modified one of my scripts with a workaround which I've shown as a patch below. Hopefully this will help someone fix this issue in the Blender package. The problem is that import is expecting the scripts to be in /usr/share/blender/scripts/ not /usr/share/blender/scripts/blender/ - that extra subdirectory causes the problem. Moving the scripts up a directory fixes all the standard scripts.

--- a/primstar/uv_tools.py
+++ b/primstar/uv_tools.py
@@ -41,7 +41,14 @@ except:

 import Blender
 from math import atan2, pi, sin
-from uvcalc_follow_active_coords import extend
+try:
+ from uvcalc_follow_active_coords import extend
+except ImportError:
+ try:
+ from blender.uvcalc_follow_active_coords import extend
+ except ImportError:
+ print """Debian and Ubuntu users should run 'sudo
touch /usr/share/blender/scripts/blender/__init__.py' to allow import of
Blender scripts"""
+ raise

Revision history for this message
Nazo (lovesyao) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. We are sorry that we do not always have the capacity to look at all reported bugs in a timely manner. There have been many changes in Ubuntu since that time you reported the bug and your problem may have been fixed with some of the updates. It would help us a lot if you could test it on a currently supported Ubuntu version. When you test it and it is still an issue, kindly upload the updated logs by running only once:
apport-collect <bug #>

and any other logs that are relevant for this particular issue.

Changed in blender (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.