Closed Mysterial closed 9 years ago
I confirmed that this works correctly on 9.1
Cannot reproduce. Can you provide the exact steps, including what you filled out in the wizard?
I opened it via Project -> New From Template -> Create Komodo Language
To test, I left all the fields at default except for language name (LScript) and file extension (.ls)
Are you certain you had write permissions to the location where you chose to save the files?
I think I'm seeing the same thing (KE 9.2.0, Vista 32 bit), using c:\projects\LScript
as the project folder, then following Mysterial's steps by leaving the defaults except for language name and extension.
The path is writable and not special in any way. The LScript.komodoproject
file, .komodotools
folder, and the folder's contents are there, but nothing else (same as above).
Could the extraneous double quotes in the filenames be causing a problem? shrug
Here's the log:
[2015-08-12 19:10:24,767] [ERROR] URIlib: [Errno 22] invalid mode ('wb+') or filename: u'"C:\\projects\\LScript"\\chrome.manifest'
Traceback (most recent call last):
File "C:\Program Files\ActiveState Komodo Edit 9.2\lib\mozilla\python\komodo\URIlib.py", line 628, in open
self._file = open(self._path, self._mode)
IOError: [Errno 22] invalid mode ('wb+') or filename: u'"C:\\projects\\LScript"\\chrome.manifest'
ERROR:xpcom:Unhandled exception calling 'int8 * readfile(in dipper retval unicode &);'
Traceback (most recent call last):
File "C:\Program Files\ActiveState Komodo Edit 9.2\lib\mozilla\python\xpcom\server\policy.py", line 300, in _CallMethod_
return 0, func(*params)
File "C:\Program Files\ActiveState Komodo Edit 9.2\lib\mozilla\components\koFileEx.py", line 125, in readfile
return self.read(-1)
File "C:\Program Files\ActiveState Komodo Edit 9.2\lib\mozilla\python\komodo\URIlib.py", line 827, in read
bufptr = FileHandlerBase.read(self, nBytes)
File "C:\Program Files\ActiveState Komodo Edit 9.2\lib\mozilla\python\komodo\URIlib.py", line 533, in read
return self._file.read(nBytes)
AttributeError: 'NoneType' object has no attribute 'read'
[2015-08-12 19:14:54,230] [WARNING] koextgen: Unable to read file: chrome://koextgen/content/resources/komodolang/chrome.p.manifest
[2015-08-12 19:14:54,246] [ERROR] URIlib: [Errno 22] invalid mode ('wb+') or filename: u'"C:\\projects\\LScript"\\install.rdf'
Traceback (most recent call last):
File "C:\Program Files\ActiveState Komodo Edit 9.2\lib\mozilla\python\komodo\URIlib.py", line 628, in open
self._file = open(self._path, self._mode)
IOError: [Errno 22] invalid mode ('wb+') or filename: u'"C:\\projects\\LScript"\\install.rdf'
[2015-08-12 19:15:03,967] [ERROR] URIlib: [Errno 2] No such file or directory: u'C:\\projects\\LScript\\udl\\lscript-mainlex.udl'
Traceback (most recent call last):
File "C:\Program Files\ActiveState Komodo Edit 9.2\lib\mozilla\python\komodo\URIlib.py", line 628, in open
self._file = open(self._path, self._mode)
IOError: [Errno 2] No such file or directory: u'C:\\projects\\LScript\\udl\\lscript-mainlex.udl'
[2015-08-12 19:15:03,967] [WARNING] koextgen: Unable to read file: C:\projects\LScript\udl\lscript-mainlex.udl
[2015-08-12 19:15:03,967] [ERROR] URIlib: [Errno 2] No such file or directory: u'C:\\projects\\LScript\\components\\koLScript_UDL_Language.py'
Traceback (most recent call last):
File "C:\Program Files\ActiveState Komodo Edit 9.2\lib\mozilla\python\komodo\URIlib.py", line 628, in open
self._file = open(self._path, self._mode)
IOError: [Errno 2] No such file or directory: u'C:\\projects\\LScript\\components\\koLScript_UDL_Language.py'
[2015-08-12 19:15:03,967] [WARNING] koextgen: Unable to read file: C:\projects\LScript\components\koLScript_UDL_Language.py
[2015-08-12 19:15:03,967] [ERROR] URIlib: [Errno 2] No such file or directory: u'C:\\projects\\LScript\\udl\\lscript-mainlex.udl'
Traceback (most recent call last):
File "C:\Program Files\ActiveState Komodo Edit 9.2\lib\mozilla\python\komodo\URIlib.py", line 628, in open
self._file = open(self._path, self._mode)
IOError: [Errno 2] No such file or directory: u'C:\\projects\\LScript\\udl\\lscript-mainlex.udl'
[2015-08-12 19:15:08,226] [ERROR] URIlib: [Errno 2] No such file or directory: u'C:\\projects\\LScript\\components\\koLScript_UDL_Language.py'
Traceback (most recent call last):
File "C:\Program Files\ActiveState Komodo Edit 9.2\lib\mozilla\python\komodo\URIlib.py", line 628, in open
self._file = open(self._path, self._mode)
IOError: [Errno 2] No such file or directory: u'C:\\projects\\LScript\\components\\koLScript_UDL_Language.py'
I see the same errors after creating a regular extension, too. (KE 9.2.0, Vista 32bit)
@mitchell-as could you please look into this for 9.2.1? I think it might be windows only.
@ervumlens - woah, vista? Living life on the edge huh :p
@Naatan I confirm this is a bug and was introduced in 9.2. It works just fine in 9.1. I don't know what might have caused it though.
Floating quotes in the path produces the error.
ko.interpolate.interpolateString('%p')
is producing the double-quoted project folder names in Windows as of https://github.com/Komodo/KomodoEdit/commit/350f53a0e572bae3a1017dabcf67417adadfdf94. I'll test this some more in Windows 6 once the hard drive light stops flashing for no reason.
Here's a macro that shows the problem a little clearer. First create a file named testfile.js
in the project and save it with something in it, then run the macro.
//This is a javascript macro
var koext = ko.koextgen.extensionLib;
var filename = koext.getProjectPath('testfile.js');
alert("filename: " + filename);
alert("contents: " + koext.readFile(filename));
In Windows, In KE 9.1, the contents are displayed correctly. In 9.2, the contents fail to display.
Awesome job tracking that down @ervumlens, that will make fixing this a ton easier.
Komodo 9.2/Win7 x64
When I try to use the language extension template, after filling out the form I get these errors:
I checked the directory where I put the project and there's only a ".komodotools" directory and the project file, it doesn't appear to have written the source files. I tried different paths as well as filling only the minimal amount in the form in case something I was adding was breaking it, but that didn't seem to help.