1
$\begingroup$

I'm new to Blender scripting (and to python too), I started to try to use it but I already get some error...

Traceback (most recent call last): File "", line 1, in ImportError: No module named 'Blender'

This is my script...

import Blender

I know this sounds ridiculous, but I cannot find the solution...

$\endgroup$
0

1 Answer 1

2
$\begingroup$

It looks like you are following a tutorial/code written for Blender 2.49 or lower. However, if you are running that code in a current version of Blender 2.50 and upwards there is no module named Blender. That's why you get that Import Error.

A good place to get information about the current API and Blender script writing in general is the current documentation. It contains :

  • Blender/Python Quickstart: new to blender/scripting and want to get your feet wet?
  • Blender/Python API Overview: a more complete explanation of python integration
  • Blender/Python Addon Tutorial: a step by step guide on how to write an addon from scratch
  • Blender/Python API Reference Usage: examples of how to use the API reference docs
  • Best Practice: Conventions to follow for writing good scripts
  • Tips and Tricks: Hints to help you while writing scripts for blender
  • Gotcha’s: some of the problems you may come up against when writing scripts

...and a whole lot more :)

$\endgroup$
1
  • 1
    $\begingroup$ Thanks! I'm running on Blender 2.76, so I'm sure it will be useful. Let's dig into that! $\endgroup$
    – katsele
    Dec 3, 2015 at 21:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .