Komodo 4.4 was working just fine, but after setting up apache, mysql, php and mod_python, installing some modules for php and python and updating and building a pair of C++ projects under a directory that is part of a Komodo project, Komodo was unable to load any project file (.kpf). When I ran Komodo with the -v switch, it would output this:
[daroan@rouslan B]$ /usr/local/Komodo-IDE/bin/komodo -v trade.kpf
komodo: debug: Komodo information:
komodo: debug: Version: Komodo IDE 4.4.0 (Build 20211)
komodo: debug: OS type: Linux release 2.6.25.6-55.fc9.x86_64 on x86_64 (#1 SMP Tue Jun 10 16:05:21 EDT 2008)
komodo: debug: Komodo startup options:
komodo: debug: nFiles: 1
komodo: debug: file 0: trade.kpf
komodo: debug: mutex name: '/home/daroan/.komodoide/4.4/host-rouslan/mutex.lock'
komodo: debug: acquired mutex: fd=3
komodo: debug: running lock name: '/home/daroan/.komodoide/4.4/host-rouslan/running.lock'
komodo: debug: No current running Komodo - Ok: fd=4
komodo: debug: commandments file name: '/home/daroan/.komodoide/4.4/host-rouslan/commandments.fifo'
komodo: debug: first commandments file name: '/home/daroan/.komodoide/4.4/host-rouslan/first-commandments.txt'
komodo: debug: issuing commandments
komodo: debug: issued commandment: open /home/daroan/dev/B/trade.kpf
komodo: debug: saving startup environment...
komodo: debug: startup env name: '/home/daroan/.komodoide/4.4/host-rouslan/startup-env.tmp'
komodo: debug: writing out startup environment
komodo: debug: setting up environment for XRE launch...
komodo: debug: setting XRE_PROFILE_PATH=/home/daroan/.komodoide/4.4/host-rouslan/XRE
komodo: debug: setting _XRE_USERAPPDATADIR=/home/daroan/.komodoide/4.4/host-rouslan/XRE
komodo: debug: unsetting MOZILLA_FIVE_HOME env var
komodo: warning: environment variable could possibly conflict with Komodo operation: 'MOZ_PIS_SESSION_PID=6667'
komodo: warning: environment variable could possibly conflict with Komodo operation: 'MOZ_PIS_MOZBINDIR=/usr/local/Komodo-IDE/bin/../lib/mozilla'
komodo: warning: environment variable could possibly conflict with Komodo operation: 'MOZ_PIS_API=2'
komodo: warning: environment variable could possibly conflict with Komodo operation: 'MOZ_PIS_USER_DIR=.komodo'
komodo: debug: setting KOMODO_HOSTNAME=rouslan
komodo: debug: setting _KOMODO_VERUSERDATADIR=/home/daroan/.komodoide/4.4/
komodo: debug: setting _KOMODO_HOSTUSERDATADIR=/home/daroan/.komodoide/4.4/host-rouslan/
komodo: debug: setting KOMODO_VERBOSE=1
komodo: debug: startup argv for XRE:
komodo: debug: argv[0] = '/usr/local/Komodo-IDE/bin/../lib/mozilla/komodo-bin'
Gtk-Message: Failed to load module "gnomebreakpad": libgnomebreakpad.so: cannot open shared object file: No such file or directory
[daroan@rouslan B]$ WARNING: keybindings: Upgrading keybindings from version: 3 to 4
** Unhandled exception calling 'int8 load(in wstring);'
Traceback (most recent call last):
File "/usr/local/Komodo-IDE/lib/mozilla/python/xpcom/server/policy.py", line 273, in _CallMethod_
return 0, func(*params)
File "/usr/local/Komodo-IDE/lib/mozilla/components/koProject.py", line 1947, in load
self._parseStream(stream, url, fname)
File "/usr/local/Komodo-IDE/lib/mozilla/components/koProject.py", line 2251, in _parseStream
self.getChildren()
File "/usr/local/Komodo-IDE/lib/mozilla/components/koProject.py", line 1634, in getChildren
self.refreshChildren()
File "/usr/local/Komodo-IDE/lib/mozilla/components/koProject.py", line 1534, in refreshChildren
self._updateLiveChildren(config)
File "/usr/local/Komodo-IDE/lib/mozilla/components/koProject.py", line 1606, in _updateLiveChildren
url = uriparse.localPathToURI(name)
File "/usr/local/Komodo-IDE/lib/mozilla/python/komodo/uriparse.py", line 59, in localPathToURI
% (localPath,koFileEx.path))
ValueError: '/home/daroan/dev/B/source\include\history\table_list.inc' does not appear to be a proper local path [/home/daroan/dev/B/source/include/history/table_list.inc]
** Returning nsresult of NS_ERROR_FAILUREI copied the entire project directory from a windows partition so it's no suprise that an issue from backslashes would arise. But I grepped the entire project directory and replaced all the backslashes, and even checked /etc and /usr/local for \table_list.inc but the problem persisted. Deleting .komodoide from my home directory didn't help either.
I have absolutely no idea what triggered this problem. I set all the project specific settings for the web server in a single .htaccess file and it doesn't have table_list.inc or any backslashes so I can't image why this was only a problem after all the setup.
I added
if localPath == '/home/daroan/dev/B/source\\include\\history\\table_list.inc': localPath = localPath.replace('\\','/')
to Komodo-IDE/lib/mozilla/python/komodo/uriparse.py to get around this problem but I would prefer real solution. Does anyone have an idea as to what is causing this?
We did change the uriparse module between 4.3 and 4.4, but it
shouldn't be converting forward slashes to backward slashes on
a Linux platform.
Could you add two print statements to the code, rerun komodo -v,
load the project, and report what happens?
Index: uriparse.py =================================================================== --- uriparse.py (revision 20338) +++ uriparse.py (working copy) @@ -54,6 +54,11 @@ try: koFileEx = _getKoFileEx() koFileEx.path = localPath + print "localPath=%s, normpath(localPath)=%s, koFileEx.path=%s, normpath(koFileEx.path)=%s" \ + (localPath, + os.path.normpath(localPath), + koFileEx.path, + os.path.normpath(koFileEx.path)) if os.path.normpath(koFileEx.path) != os.path.normpath(localPath): raise ValueError("'%s' does not appear to be a proper local path [%s]" % (localPath,koFileEx.path)) Index: koProject.py =================================================================== --- koProject.py (revision 20338) +++ koProject.py (working copy) @@ -1602,6 +1602,7 @@ if fname not in filenames: oldparts.append(part) for name in filenames: + print "koProject.py: abspath(%s) = %s" % (name, os.path.abspath(name)) name = os.path.abspath(name) url = uriparse.localPathToURI(name) if not self._project._urlmap.get(url, None):komodo: debug: Komodo information: komodo: debug: Version: Komodo IDE 4.4.0 (Build 20211) komodo: debug: OS type: Linux release 2.6.25.6-55.fc9.x86_64 on x86_64 (#1 SMP Tue Jun 10 16:05:21 EDT 2008) komodo: debug: Komodo startup options: komodo: debug: nFiles: 1 komodo: debug: file 0: trade.kpf komodo: debug: mutex name: '/home/daroan/.komodoide/4.4/host-rouslan/mutex.lock' komodo: debug: acquired mutex: fd=3 komodo: debug: running lock name: '/home/daroan/.komodoide/4.4/host-rouslan/running.lock' komodo: debug: No current running Komodo - Ok: fd=4 komodo: debug: commandments file name: '/home/daroan/.komodoide/4.4/host-rouslan/commandments.fifo' komodo: debug: first commandments file name: '/home/daroan/.komodoide/4.4/host-rouslan/first-commandments.txt' komodo: debug: issuing commandments komodo: debug: issued commandment: open /home/daroan/dev/B/trade.kpf komodo: debug: saving startup environment... komodo: debug: startup env name: '/home/daroan/.komodoide/4.4/host-rouslan/startup-env.tmp' komodo: debug: writing out startup environment komodo: debug: setting up environment for XRE launch... komodo: debug: setting XRE_PROFILE_PATH=/home/daroan/.komodoide/4.4/host-rouslan/XRE komodo: debug: setting _XRE_USERAPPDATADIR=/home/daroan/.komodoide/4.4/host-rouslan/XRE komodo: debug: unsetting MOZILLA_FIVE_HOME env var komodo: warning: environment variable could possibly conflict with Komodo operation: 'MOZ_PIS_SESSION_PID=17605' komodo: warning: environment variable could possibly conflict with Komodo operation: 'MOZ_PIS_MOZBINDIR=/usr/local/Komodo-IDE/bin/../lib/mozilla' komodo: warning: environment variable could possibly conflict with Komodo operation: 'MOZ_PIS_API=2' komodo: warning: environment variable could possibly conflict with Komodo operation: 'MOZ_PIS_USER_DIR=.komodo' komodo: debug: setting KOMODO_HOSTNAME=rouslan komodo: debug: setting _KOMODO_VERUSERDATADIR=/home/daroan/.komodoide/4.4/ komodo: debug: setting _KOMODO_HOSTUSERDATADIR=/home/daroan/.komodoide/4.4/host-rouslan/ komodo: debug: setting KOMODO_VERBOSE=1 komodo: debug: startup argv for XRE: komodo: debug: argv[0] = '/usr/local/Komodo-IDE/bin/../lib/mozilla/komodo-bin' Gtk-Message: Failed to load module "gnomebreakpad": libgnomebreakpad.so: cannot open shared object file: No such file or directory [daroan@rouslan B]$ WARNING: keybindings: Upgrading keybindings from version: 3 to 4 koProject.py: abspath(/home/daroan/dev/B/csearch.bat) = /home/daroan/dev/B/csearch.bat localPath=/home/daroan/dev/B/csearch.bat, normpath(localPath)=/home/daroan/dev/B/csearch.bat, koFileEx.path=/home/daroan/dev/B/csearch.bat, normpath(koFileEx.path)=/home/daroan/dev/B/csearch.bat koProject.py: abspath(/home/daroan/dev/B/exchange.postgre.sql.php) = /home/daroan/dev/B/exchange.postgre.sql.php localPath=/home/daroan/dev/B/exchange.postgre.sql.php, normpath(localPath)=/home/daroan/dev/B/exchange.postgre.sql.php, koFileEx.path=/home/daroan/dev/B/exchange.postgre.sql.php, normpath(koFileEx.path)=/home/daroan/dev/B/exchange.postgre.sql.php koProject.py: abspath(/home/daroan/dev/B/sql_procedures.php) = /home/daroan/dev/B/sql_procedures.php localPath=/home/daroan/dev/B/sql_procedures.php, normpath(localPath)=/home/daroan/dev/B/sql_procedures.php, koFileEx.path=/home/daroan/dev/B/sql_procedures.php, normpath(koFileEx.path)=/home/daroan/dev/B/sql_procedures.php koProject.py: abspath(/home/daroan/dev/B/email_reader) = /home/daroan/dev/B/email_reader localPath=/home/daroan/dev/B/email_reader, normpath(localPath)=/home/daroan/dev/B/email_reader, koFileEx.path=/home/daroan/dev/B/email_reader, normpath(koFileEx.path)=/home/daroan/dev/B/email_reader koProject.py: abspath(/home/daroan/dev/B/todo.txt) = /home/daroan/dev/B/todo.txt localPath=/home/daroan/dev/B/todo.txt, normpath(localPath)=/home/daroan/dev/B/todo.txt, koFileEx.path=/home/daroan/dev/B/todo.txt, normpath(koFileEx.path)=/home/daroan/dev/B/todo.txt koProject.py: abspath(/home/daroan/dev/B/doc_files) = /home/daroan/dev/B/doc_files localPath=/home/daroan/dev/B/doc_files, normpath(localPath)=/home/daroan/dev/B/doc_files, koFileEx.path=/home/daroan/dev/B/doc_files, normpath(koFileEx.path)=/home/daroan/dev/B/doc_files koProject.py: abspath(/home/daroan/dev/B/important.txt) = /home/daroan/dev/B/important.txt localPath=/home/daroan/dev/B/important.txt, normpath(localPath)=/home/daroan/dev/B/important.txt, koFileEx.path=/home/daroan/dev/B/important.txt, normpath(koFileEx.path)=/home/daroan/dev/B/important.txt koProject.py: abspath(/home/daroan/dev/B/out2.sql) = /home/daroan/dev/B/out2.sql localPath=/home/daroan/dev/B/out2.sql, normpath(localPath)=/home/daroan/dev/B/out2.sql, koFileEx.path=/home/daroan/dev/B/out2.sql, normpath(koFileEx.path)=/home/daroan/dev/B/out2.sql koProject.py: abspath(/home/daroan/dev/B/sample data) = /home/daroan/dev/B/sample data localPath=/home/daroan/dev/B/sample data, normpath(localPath)=/home/daroan/dev/B/sample data, koFileEx.path=/home/daroan/dev/B/sample data, normpath(koFileEx.path)=/home/daroan/dev/B/sample data koProject.py: abspath(/home/daroan/dev/B/sql_procedures.postgre.php) = /home/daroan/dev/B/sql_procedures.postgre.php localPath=/home/daroan/dev/B/sql_procedures.postgre.php, normpath(localPath)=/home/daroan/dev/B/sql_procedures.postgre.php, koFileEx.path=/home/daroan/dev/B/sql_procedures.postgre.php, normpath(koFileEx.path)=/home/daroan/dev/B/sql_procedures.postgre.php koProject.py: abspath(/home/daroan/dev/B/UDF) = /home/daroan/dev/B/UDF localPath=/home/daroan/dev/B/UDF, normpath(localPath)=/home/daroan/dev/B/UDF, koFileEx.path=/home/daroan/dev/B/UDF, normpath(koFileEx.path)=/home/daroan/dev/B/UDF koProject.py: abspath(/home/daroan/dev/B/gen_sql.bat) = /home/daroan/dev/B/gen_sql.bat localPath=/home/daroan/dev/B/gen_sql.bat, normpath(localPath)=/home/daroan/dev/B/gen_sql.bat, koFileEx.path=/home/daroan/dev/B/gen_sql.bat, normpath(koFileEx.path)=/home/daroan/dev/B/gen_sql.bat koProject.py: abspath(/home/daroan/dev/B/sql_support.php) = /home/daroan/dev/B/sql_support.php localPath=/home/daroan/dev/B/sql_support.php, normpath(localPath)=/home/daroan/dev/B/sql_support.php, koFileEx.path=/home/daroan/dev/B/sql_support.php, normpath(koFileEx.path)=/home/daroan/dev/B/sql_support.php koProject.py: abspath(/home/daroan/dev/B/source) = /home/daroan/dev/B/source localPath=/home/daroan/dev/B/source, normpath(localPath)=/home/daroan/dev/B/source, koFileEx.path=/home/daroan/dev/B/source, normpath(koFileEx.path)=/home/daroan/dev/B/source koProject.py: abspath(/home/daroan/dev/B/load_ip2country.bat) = /home/daroan/dev/B/load_ip2country.bat localPath=/home/daroan/dev/B/load_ip2country.bat, normpath(localPath)=/home/daroan/dev/B/load_ip2country.bat, koFileEx.path=/home/daroan/dev/B/load_ip2country.bat, normpath(koFileEx.path)=/home/daroan/dev/B/load_ip2country.bat koProject.py: abspath(/home/daroan/dev/B/reset database.bat) = /home/daroan/dev/B/reset database.bat localPath=/home/daroan/dev/B/reset database.bat, normpath(localPath)=/home/daroan/dev/B/reset database.bat, koFileEx.path=/home/daroan/dev/B/reset database.bat, normpath(koFileEx.path)=/home/daroan/dev/B/reset database.bat koProject.py: abspath(/home/daroan/dev/B/changes.sql) = /home/daroan/dev/B/changes.sql localPath=/home/daroan/dev/B/changes.sql, normpath(localPath)=/home/daroan/dev/B/changes.sql, koFileEx.path=/home/daroan/dev/B/changes.sql, normpath(koFileEx.path)=/home/daroan/dev/B/changes.sql koProject.py: abspath(/home/daroan/dev/B/language) = /home/daroan/dev/B/language localPath=/home/daroan/dev/B/language, normpath(localPath)=/home/daroan/dev/B/language, koFileEx.path=/home/daroan/dev/B/language, normpath(koFileEx.path)=/home/daroan/dev/B/language koProject.py: abspath(/home/daroan/dev/B/library modifications) = /home/daroan/dev/B/library modifications localPath=/home/daroan/dev/B/library modifications, normpath(localPath)=/home/daroan/dev/B/library modifications, koFileEx.path=/home/daroan/dev/B/library modifications, normpath(koFileEx.path)=/home/daroan/dev/B/library modifications koProject.py: abspath(/home/daroan/dev/B/db_updates.sql.php) = /home/daroan/dev/B/db_updates.sql.php localPath=/home/daroan/dev/B/db_updates.sql.php, normpath(localPath)=/home/daroan/dev/B/db_updates.sql.php, koFileEx.path=/home/daroan/dev/B/db_updates.sql.php, normpath(koFileEx.path)=/home/daroan/dev/B/db_updates.sql.php koProject.py: abspath(/home/daroan/dev/B/configure) = /home/daroan/dev/B/configure localPath=/home/daroan/dev/B/configure, normpath(localPath)=/home/daroan/dev/B/configure, koFileEx.path=/home/daroan/dev/B/configure, normpath(koFileEx.path)=/home/daroan/dev/B/configure koProject.py: abspath(/home/daroan/dev/B/tutorials) = /home/daroan/dev/B/tutorials localPath=/home/daroan/dev/B/tutorials, normpath(localPath)=/home/daroan/dev/B/tutorials, koFileEx.path=/home/daroan/dev/B/tutorials, normpath(koFileEx.path)=/home/daroan/dev/B/tutorials koProject.py: abspath(/home/daroan/dev/B/update_perm_fields.pl) = /home/daroan/dev/B/update_perm_fields.pl localPath=/home/daroan/dev/B/update_perm_fields.pl, normpath(localPath)=/home/daroan/dev/B/update_perm_fields.pl, koFileEx.path=/home/daroan/dev/B/update_perm_fields.pl, normpath(koFileEx.path)=/home/daroan/dev/B/update_perm_fields.pl koProject.py: abspath(/home/daroan/dev/B/exchange.sql.php) = /home/daroan/dev/B/exchange.sql.php localPath=/home/daroan/dev/B/exchange.sql.php, normpath(localPath)=/home/daroan/dev/B/exchange.sql.php, koFileEx.path=/home/daroan/dev/B/exchange.sql.php, normpath(koFileEx.path)=/home/daroan/dev/B/exchange.sql.php koProject.py: abspath(/home/daroan/dev/B/thumbnail.pl) = /home/daroan/dev/B/thumbnail.pl localPath=/home/daroan/dev/B/thumbnail.pl, normpath(localPath)=/home/daroan/dev/B/thumbnail.pl, koFileEx.path=/home/daroan/dev/B/thumbnail.pl, normpath(koFileEx.path)=/home/daroan/dev/B/thumbnail.pl koProject.py: abspath(/home/daroan/dev/B/test) = /home/daroan/dev/B/test localPath=/home/daroan/dev/B/test, normpath(localPath)=/home/daroan/dev/B/test, koFileEx.path=/home/daroan/dev/B/test, normpath(koFileEx.path)=/home/daroan/dev/B/test koProject.py: abspath(/home/daroan/dev/B/source\include\history\table_list.inc) = /home/daroan/dev/B/source\include\history\table_list.inc localPath=/home/daroan/dev/B/source\include\history\table_list.inc, normpath(localPath)=/home/daroan/dev/B/source\include\history\table_list.inc, koFileEx.path=/home/daroan/dev/B/source/include/history/table_list.inc, normpath(koFileEx.path)=/home/daroan/dev/B/source/include/history/table_list.inc ** Unhandled exception calling 'int8 load(in wstring);' Traceback (most recent call last): File "/usr/local/Komodo-IDE/lib/mozilla/python/xpcom/server/policy.py", line 273, in _CallMethod_ return 0, func(*params) File "/usr/local/Komodo-IDE/lib/mozilla/components/koProject.py", line 1948, in load self._parseStream(stream, url, fname) File "/usr/local/Komodo-IDE/lib/mozilla/components/koProject.py", line 2252, in _parseStream self.getChildren() File "/usr/local/Komodo-IDE/lib/mozilla/components/koProject.py", line 1635, in getChildren self.refreshChildren() File "/usr/local/Komodo-IDE/lib/mozilla/components/koProject.py", line 1534, in refreshChildren self._updateLiveChildren(config) File "/usr/local/Komodo-IDE/lib/mozilla/components/koProject.py", line 1607, in _updateLiveChildren url = uriparse.localPathToURI(name) File "/usr/local/Komodo-IDE/lib/mozilla/python/komodo/uriparse.py", line 66, in localPathToURI % (localPath,koFileEx.path)) ValueError: '/home/daroan/dev/B/source\include\history\table_list.inc' does not appear to be a proper local path [/home/daroan/dev/B/source/include/history/table_list.inc] ** Returning nsresult of NS_ERROR_FAILURECould you grep 'table_list.inc' (no backslashes) in the kpf file(s)
you're trying to use? Also could you load the kpf file(s) in another
editor, and manually search for backslashes that way?
It appears the problem is triggered by that folder. I was able to create and load a project in a different directory.
Anyway, it doesn't seem to be the kpf file. I can create a brand new one. Its content is this:
And except for the name of the project, and an extra two lines output for trake.kpf (the original project), the -v output is exactly the same.
Oh man, I'm blind!
I found the backslashes. I have a file named "source\include\history\table_list.inc". I don't mean I have a file named "table_list.inc" inside the folder "history", I mean that is the name in entirety. It was generated by one of the C++ projects I mentioned at the beginning; I just never noticed it.
Sorry for the wild goose chase.