Better ofProject.py?

Hey everybody, I’m on Ubu Jaunty (at least until Karmic comes out), and I have oF working and everything, but the support scripts (ofProject, etc.) aren’t working right. I know that I saw an updated version in a thread somewhere, but I can’t seem to find it. If anyone has an updated (as in Works With Python and Doesn’t Fail) version of ofProject.py and the other scripts, would you please post them here?

Thanks! :mrgreen:

hi

the last version is the one that goes with 006, it should work in jaunty without problem, except for some warnings related to the xml parser being for python 2.5 and jaunty using 2.6 but apart from that it works.

what problem are you having?

Actually, you hit it on the head. It was shouting about an XML error, which I thought was something wrong in Python. Unfortunately, (at least as far as Synaptic can tell), I already have Python 2.5 installed, and still it doesn’t work.

I’m guessing that the problem lies with the system’s chosen “default” interpreter for Python being linked to the 2.6 install instead of 2.5; I just had a similar problem with using the Java Scanner class in Eclipse that was resolved by downloading the proper JRE and setting it as the system-default handler for Java. I’m going to fiddle with that idea for a bit; if anyone else has any suggestions, feel free to post them.

Update: I reset my python config back to using 2.5, and I reinstalled ofProjectManager, but it still says that there is an error parsing a DTD file:

shotgunninja@ubuntu:~/Desktop/of_preRelease_v0.06_linux_cb_FAT/apps/shotgunninja$ ofProject create RTSGame
Traceback (most recent call last):
File “/usr/local/bin/ofProject”, line 2, in
from ofProject import ofProject
File “/usr/local/ofProjectManager/ofProject.py”, line 3, in
from ofxDescriptor import ofxDescriptor
File “/usr/local/ofProjectManager/ofxDescriptor.py”, line 2, in
import amara
File “/var/lib/python-support/python2.5/amara/__init__.py”, line 11, in
import binderytools
File “/var/lib/python-support/python2.5/amara/binderytools.py”, line 13, in
from Ft.Xml import InputSource
File “/usr/lib/python2.5/site-packages/Ft/Xml/InputSource.py”, line 355, in
DefaultFactory = InputSourceFactory(catalog=GetDefaultCatalog())
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 579, in GetDefaultCatalog
catalog = Catalog(uri, quiet)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 95, in __init__
self._parseXmlCat(data)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 377, in _parseXmlCat
p.parse(source)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 476, in startElementNS
delegate = Catalog(catalog, self.quiet)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 95, in __init__
self._parseXmlCat(data)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 377, in _parseXmlCat
p.parse(source)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 476, in startElementNS
delegate = Catalog(catalog, self.quiet)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 95, in __init__
self._parseXmlCat(data)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 377, in _parseXmlCat
p.parse(source)
xml.sax._exceptions.SAXParseException: file:///usr/share/xml/gnustep/gsdoc-1_0_0.dtd:41:0: syntax error

Any ideas? Currently apt-get installing gnustep.

hi

just trying it and don’t get any error like that. what version of ubuntu? are you using? also you can change the script /usr/local/bin/ofProject, on line 1:

#!/usr/bin/python

to

#!/usr/bin/python2.5

so it uses python 2.5 that seems to be more compatible with the xml parser than the default 2.6 since jaunty.

Hello, I’m a bran new user from Argentina. I’m amaize of this wonderfull framework. Realy enjoying the educational process of learning C++ form mixing media arts.
But I get the exactly same problem. Same log.

Traceback (most recent call last):
File “/usr/local/bin/ofProject”, line 2, in
from ofProject import ofProject
File “/usr/local/ofProjectManager/ofProject.py”, line 2, in
import amara
File “/usr/lib/pymodules/python2.5/amara/__init__.py”, line 11, in
import binderytools
File “/usr/lib/pymodules/python2.5/amara/binderytools.py”, line 13, in
from Ft.Xml import InputSource
File “/usr/lib/python2.5/site-packages/Ft/Xml/InputSource.py”, line 355, in
DefaultFactory = InputSourceFactory(catalog=GetDefaultCatalog())
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 579, in GetDefaultCatalog
catalog = Catalog(uri, quiet)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 95, in __init__
self._parseXmlCat(data)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 377, in _parseXmlCat
p.parse(source)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 476, in startElementNS
delegate = Catalog(catalog, self.quiet)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 95, in __init__
self._parseXmlCat(data)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 377, in _parseXmlCat
p.parse(source)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 476, in startElementNS
delegate = Catalog(catalog, self.quiet)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 95, in __init__
self._parseXmlCat(data)
File “/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.py”, line 377, in _parseXmlCat
p.parse(source)
xml.sax._exceptions.SAXParseException: file:///usr/share/xml/gnustep/gsdoc-1_0_0.dtd:41:0: syntax error

I’m using Karmic 9.10… I already change the /usr/bin/python for the python2.5. and nothing… still unable to use the ofProyects
Any ideas?

Thanks

Patrico

Yeah,
a working version with python 2.6 (and so newer Versions of Ubuntu) would be awesome…