Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors trying to create language extension #514

Closed
Mysterial opened this issue Aug 9, 2015 · 11 comments
Closed

Errors trying to create language extension #514

Mysterial opened this issue Aug 9, 2015 · 11 comments

Comments

@Mysterial
Copy link

Komodo 9.2/Win7 x64

When I try to use the language extension template, after filling out the form I get these errors:

[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [koIFileEx.open]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://koextgen/content/koextgen_lib.js :: this.writeFile :: line 125" data: no]
arg filename: "G:\Komodo\LScript"\chrome.manifest

[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [koIFileEx.open]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://koextgen/content/koextgen_lib.js :: this.writeFile :: line 125" data: no]
arg filename: "G:\Komodo\LScript"\install.rdf

[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [koIFileEx.open]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://koextgen/content/koextgen_lib.js :: this.writeFile :: line 125" data: no]
arg filename: G:\Komodo\LScript\udl\lscript-mainlex.udl

[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [koIFileEx.open]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://koextgen/content/koextgen_lib.js :: this.writeFile :: line 125" data: no]
arg filename: G:\Komodo\LScript\components\koLScript_UDL_Language.py

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.

@Mysterial
Copy link
Author

I confirmed that this works correctly on 9.1

@Naatan
Copy link
Member

Naatan commented Aug 10, 2015

Cannot reproduce. Can you provide the exact steps, including what you filled out in the wizard?

@Mysterial
Copy link
Author

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)

@Naatan
Copy link
Member

Naatan commented Aug 12, 2015

Are you certain you had write permissions to the location where you chose to save the files?

@ervumlens
Copy link

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.

image

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'

@ervumlens
Copy link

I see the same errors after creating a regular extension, too. (KE 9.2.0, Vista 32bit)

@Naatan Naatan added this to the 9.2.1 milestone Aug 13, 2015
@Naatan
Copy link
Member

Naatan commented Aug 13, 2015

@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

@mitchell-as
Copy link
Contributor

@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.

@ervumlens
Copy link

Floating quotes in the path produces the error.

I'll test this some more in Windows 6 once the hard drive light stops flashing for no reason.

@ervumlens
Copy link

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.

@Naatan
Copy link
Member

Naatan commented Aug 13, 2015

Awesome job tracking that down @ervumlens, that will make fixing this a ton easier.

@Naatan Naatan assigned Naatan and unassigned mitchell-as Aug 14, 2015
Naatan added a commit that referenced this issue Aug 14, 2015
…ows - fixes #514

The issue this commit was originally trying to address needs to be fixed at a higher level.

Revert "Fixed an error in the Run service"

This reverts commit 03e692d84437518677e38729c4d1ff54306462a9.

(integrated from master branch change 9.2.1-214-gc57a733 by Nathan Rijksen <n.rijksen@gmail.com>)
@Naatan Naatan closed this as completed in 56ca478 Aug 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants