I’ve had similar errors before, and I’ve found it’s usually because I’m misusing a function or method. It would seem to me that you are using a .reduce or .reduce() somewhere in your code; could you maybe post the relevant sections, so we can have a better idea of what’s going on? Errors like this are usually easy to fix, once you see what’s wrong.
It is always a good idea to describe problems you see as precise as possible. People don’t have to ask a dozen questions (and spend time) before they can see what your problem is, and maybe help. So:
Where do you get this error? From your description it seems that you get the error when ‘exporting from blender’ using chicken, and not when running your code.
Usually you get a traceback when you see an error (the lines above the error). It tells where in the code the error has occurred. The full traceback is probably the most important information. Post it whenever you talk about a Python error.
I get the error in the console that opens when Blender opens. The trace back is as follows:
Also, I’ve noticed this only happens when I try to export a model, using Chicken, that has a UV texture; Even though I managed to export the same model with a slightly different image; using the exact same method.
Well, it appears I have been summoned! I didn’t realise that putting Chicken in a forum post was the preferred incantation, but ho hum;-)
Anyway, as for the error its a new one, and quite strange really. Its claiming it can’t look up the reduce function, when it is a built in function that comes with the language, which makes no sense. Your comment about uv-s makes sense as that code is explicitly concerned with error checking uv information, and it wouldn’t run it if you didn’t have them.
So, a few questions -
Which version of Blender are you using? (You put Ve: 438 - if you read that off the bar at the top of Blender then its the number of vertices in your selection, not the version - look at the splash screen:-) )
Did you explicitly tell Blender to use the version of python you listed?
Has your computer had other versions of python installed at any point?
This is sufficiently strange that it might be that something has gone really screwy, and require re-installation, but at the very least we will need to identify what first.
Haha well I was going to try a spot light with a chicken filter, but I figured changing the title would work just as well.
Ok, to answer your questions:
-…and now I’m embarrassed… There’s a reason I’m a programmer. My blender version is actually 249.2
-I assume I have Python properly installed- I even set a PYTHONPATH environment variable. (same place where you change the PATH variable). When I start up Blender, the console that pops up with it says “Compiled with Python version 2.6.2. Checking for installed Python… got it!” So I assume everything is ok. Plus I’ve exported a model with a UV texture before- my error occurred when I changed the texture and tried to re-export (I did save the .tga over the old one)
-I did have Python 3.1 installed, but I uninstalled it, deleted the file, uninstalled Chicken and Blender then installed Python, Blender and Chicken (in that order) again.
While I have your attention…
Where am I supposed to save the .tgas? or does it matter? I have my .blender files separated from my .egg files.
Well, it sounds like everything is ok, which is a problem, as I really have no idea what could cause this - as I said, its complaining that a built in feature of the language doesn’t exist, which is nonsense. I have previously come across cases of a corrupt Blender file causing random errors - you might want to try recreating parts of the file, i.e. removing and recreating uv’s, textures, materials - that kind of thing - problem might go away. Given that you have had uv-s working before that suggests such an error to me. Alternatively/additionally if your willing to email me the file then I will be happy to see what happens on one of my machines.
For textures it (By default.) writes into the egg file the path to each texture relative to the .blend file - if you save the egg file elsewhere then you need to have the textures in the same relative positions to the new position of the egg file. Not ideal in all situations, but a good trade off between handling most situations and complexity. I myself keep the .blends separate from the game tree, but I save .eggs into the same directory as the .blend and then copy across, by script if need be.
Not quite. Open the egg file with an editor (Notepad++ or Gedit or something). In the first few lines you’ll find the texture entries and the paths along with those. These paths can be either relative or absolute, but relative paths make way more sense in most cases.
This is my first post to this board. So… I was running into the same problem exporting from blender 3d to .egg for panda 3d. I was getting a similiar error about reduce().
One side note: Open Source software is not like commercial software. Getting the latest versions is not always the best idea.
Short answer get Bender 3D v 2.48a and Panda 3D v 1.6.2. That seemed to solve my problem. For the longer answer keep reading.
Bender 3d version 2.49b uses Python 2.6.2 and in my case I was running panda3D v.1.6.2 which uses Python 2.5.x. When Chicken exports to .egg it calls Panda 3D. As far as I can tell this causes the error. My solution was to find a version of Bender 3d that uses the same version of Python, in my case it is Blender 3d v. 2.48a.