Python script error

When I try to export a file in AC3D format I get the error “Python error. Path too long.”
What’s the fix here? All my other export scripts seem to go ok. Wouldn’t the path be the same?

Without meaning to be snarky, maybe your path is too long. My SWAG is that you have exceeded the maximum path length on your platform.

The path is probably not what you think it is. Try printing it out to be sure. As an scripting language, python makes this very easy to do.

I am getting the same error.


Windows 2000
Blender 2.36
Python 2.3.4

I’m a newbie to the whole Python thing. Actually, I just want to use the nifty AC3D exporter for a model test (a programmer that I work with wanted the model in that format).

Blender File:

I get the “Path too long” error when I select the “All meshes” submenu on export. Is my model compatible with this script?

stiv said that the path may be too long. What path is the error referring to? I know nothing about Python. I installed it, and did a “Print sys.path” thing in the text window (got that from another thread). That test worked. So, I know that Python is working, just not the export script.

Hey, any help is greatly appreciated.

When you hit “All Meshes” you’re given a File Window with the path in the top 2 fields. C/Export is shorter than C/Program Files/3D/Miscelaneous/Blender/Projects/Experiments/Exports/Testing/


Thanks Fligh %.

One problem: I don’t get a File Window.

File>Export>AC3d (.ac …)>All Meshes…>ERROR: Python script error: check console

I go to the console thing that opens in Windows 2000 when you first start Blender. There it reads:

Traceback <most recent call last>:
File “<string>”, line 471, in ?
RuntimeError: path too long

If I don’t see a File Window, then what can I do?

Damned if I know. Maybe the path to your Blender exe folder, or your Python Path in the Info Window?

Search for that AC3D export script and open it in a TEXT window and try running it from there with Alt-P. See if you get the same prob.


Tried running it in the Text Window. Got the error to check the console. However, it did highlight the second to last line in the script:

fname = Blender.sys.makename(ext=".ac")

So, whatever that “makename” function is, that is where the problem is.

I tried to compare this export script to others that worked. I couldn’t tell you one thing that could cause the issue. It was like looking at a foreign language.

Well… since I am not a programmer, I am at a dead end. Thanks for the help though.

In source/blender/python/api2_2x/Sys.c, function M_sys_makename(), we see a check for the string exceeding the length FILE_MAXNAME, which elsewhere is defined as 80 bytes.

So, undoubtedly, the sys.makename() routine is what’s throwing the error, and the magic-limit is 80 bytes.

Thanks for the info!

I searched for Sys.c on my PC, but the search returned nothing. Is this directory structure for a pre-compiled version?

How would I increase the limit?

Thanks again