Blender Plugin Not Working

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
Deus Siddis
Trained
Trained
Posts: 235
Joined: 18 Aug 2007, 06:58

Re: Blender Plugin Not Working

Post by Deus Siddis »

DevUrandom wrote: Problem in this case is that Blender seems to use its own Python. :(
So we can't require anything, because people are not able to satisfy those requirements.
Are you sure about that, blender 2.45 says from the console- "Compiled with Python version 2.5."

No special version is mentioned.
User avatar
Audacitor
Rookie
Rookie
Posts: 17
Joined: 15 Jan 2008, 09:36

Re: Blender Plugin Not Working

Post by Audacitor »

You're right Deus, but on OS X, Blender says it was compiled with 2.3.5, which it was.  If you look at Blender's download page, you'll notice that the PPC version (which is what I have [yes, I'm ancient, but when you're 16, money enough for a new box is hard to come by]) uses 2.3.5.  In grey text below that, however, there is a custom builds section, which I only just noticed, and which links to a 2.5 version for PPC.

I'm downloading that now.  I'll report back in a few minutes.
TANSTAAFL
User avatar
Audacitor
Rookie
Rookie
Posts: 17
Joined: 15 Jan 2008, 09:36

Re: Blender Plugin Not Working

Post by Audacitor »

Problem solved.  For real this time.  Models and textures were successfully imported.  I've edited my first post to include this solution for anyone else who might need this info in the future.  We should also probably put a note in the plugins readme file for PPC users to check which version of Python their copy of Blender was compiled with, and where to get the correct one.
TANSTAAFL
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: Blender Plugin Not Working

Post by kage »

DevUrandom wrote: Problem in this case is that Blender seems to use its own Python. :(
So we can't require anything, because people are not able to satisfy those requirements.
blender definitely (by default) bundles its own python in the windows installs, since the 'perception' of windows users tends to be "vm? huh, what?", not to mention the windows packaging system (whatever the backend is for "add/remove programs") either does not support inter-package dependencies, or is never used, and certainly doesn't support version checks.  thus it's obviously more convenient to bundle everything together on windows.

os x *does* come with python installed by default, afaik, though as a friend described it, apple upgrades all their stuff in waves, and they tend to feel that if they didn't think of it, you don't need it (i think he called apple with a tech support question, and he mentioned he manually installed a newer version of python, and the response was something along the lines of "well, why would you want to do that?"). so they've got good software, but they're slow to update (more like stay isolated in an 'apple' world that doesn't flow with the rest of time).

audacitor: ppc isn't ancient. in fact, the architecture was designed to replace the shortcomings in x86 (go figure). ppc is *much* better from a performance standpoint than anything intel-like or intel-derived. in a terminal, run the following commands:
python2.3
python2.5
python

and compare version numbers reported in each. if python2.3 is found, it's probable (imo) that blender is using that, as there is zero reason for the blender people to bundle python if it's for a system that comes with the same version by default.  i know that blender can be compiled to use the system python or a bundled one, and that http://www.blender.org/download/get-blender/ has mac installs with a bundled python 2.5 install (the other installers say they 'require python 2.3').
Buginator wrote: I don't know why we just don't require Python 2.5 (or whatever), and be done with it?
This is like the guy who did the changes that require Python 2.5, and now, it is just sitting around waiting to be committed once the server kinks are worked out.

Not trying to be rude, but AFAIK, both windows & linux & most everyone else have already updated to the latest release, so why shouldn't mac people?  Is this a apple specific thing or something? 
nope, 2.4 is still much more common than 2.5 right now, afaik.  personally, i don't like that kind of "forward thinking", like linking against a newer version of a lib when you don't actually use any new functionality -- all it does it make life no easier for the people with the latest libs, and life complete hell for everybody else.

i'm not using anything new in python 2.5. i've been testing against both 2.4 and 2.5, but i'm not using anything in 2.4 that i can't give up for a 98% as-good solution, so i'd be more than happy to make these scripts 2.3 compatible, or, depending on the difficulty, further back into the 2.x series as needed.

EDIT:
Audacitor wrote: Problem Solved!  Solution is as follows:
This problem only affects Macintosh users using a PowerPC (PPC) architecture.  You poor souls.  The default Blender distribution for PPC computers is compiled using Python 2.3.5.  Python is the programming language that Blender was written in.  The PIE model plugin, however, was designed for Python 2.5 or later.  Fear not!  You can download a copy of Blender 2.45 built for Py2.5 here. For future copies of Blender or Python, see Blender's download page and look under custom builds for the PPC architecture.
i don't really consider making all the users of one system "adapt or die" to be an effective solution...
(also, blender isn't written in python, it's written in C).
once again, it was tested with python 2.4 ;) generator expressions are new in 2.4, which is the first problem you were dealing with. those are already fixed. if you still happen to have the blender version available that uses python2.3, then try replacing `s, x, y = s.rsplit(None, 2)` with `s, x, y = string.rsplit(s, None, 2)` (once again, preserving the leading whitespace), and adding "import string" as a line by itself to the top of any afflicted file.

if you get any other "AttributeError: 'str' object has no attribute 'rsplit'" style errors along the way, specifically mentioning "'str' object", then you can repeat the above step, using whatever attribute it can't find in place of 'rsplit'.
Last edited by kage on 18 Jan 2008, 00:38, edited 1 time in total.