Python console help plz

I am new baby new to python and i cant even get the simplest of code to run.

I am trying to summon a monkey using:

import bpy

bpy.obs.mesh.primitive_monkey_add(location=(0,0,0))

The error message says “check the message in the system console” however there is no information there.

Dont really want to continue my tutorial tell i can at least get one line of code to execute…

Would appreciate any help.

try

bpy.ops.mesh.primitive_monkey_add(location=(0,0,0))

Not sure if there’s a better way but you’d see the error message if you run Blender from the terminal. I’m not too deep into Blender coding though, so there might be a better way.

1 Like

Thanks for the response!

Aaaah ill try a copy paste but what is different in your line of code? 0.O

.ops. vs .obs.

God damn i dont have the eyes for this

tell me about it, that’s 80% of the scripting time for me… “…the f&*k is wrong this time?!”

Do you know of any disadvantages trying to learn python, using just blender?

I’m not the best guy to ask, pretty new to blender plus I’m not a coder - but if you’re looking to use blender in the future I don’t think it’s a wasted effort.

My guess is that’s it’s going to be used more widely and it’s probably a good investment. Also, python is python, API aside it doesn’t really matter too much which software you’re using to learn it.

sweet yeah that’s what i figured and i am trying to get really good at Blender.

1 Like

You need to learn Python first to do some basic scripting for Blender. Without such knowledge all you can do is to run individual existing commands like bpy.ops stuff and half the time some of that stuff will fail too and you wont understand why without knowing Python itself.

You do not need to know Python at all to use Blender. Python stuff is for those who want to automate and extend Blender.