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

Recurrent error on Ubuntu 14.04 and OS X 10.10 #17

Open
gtms opened this issue Feb 23, 2015 · 1 comment
Open

Recurrent error on Ubuntu 14.04 and OS X 10.10 #17

gtms opened this issue Feb 23, 2015 · 1 comment

Comments

@gtms
Copy link

gtms commented Feb 23, 2015

With the Repl server on, I run the command zotelo-set-collection on a *.tex file.
Both on Ubuntu 14.04 and on OS X 10.10, with Emacs Prelude, I get the following error message on the *moz-command-output* buffer:

TypeError: Components.classes['@zotero.org/Zotero;1'] is undefined

The *message* buffer reports, with the variable zotelo-verbose set to t:

zotelo message [Mon Feb 23 13:14:15 2015]
Moz-command finished

zotelo message [Mon Feb 23 13:14:15 2015]
Moz-command finished

zotelo message [Mon Feb 23 13:14:15 2015]
Collections:
!!! TypeError: Components.classes['@zotero.org/Zotero;1'] is undefined

Could you please provide me guidance to debug this error?

@vspinu
Copy link
Owner

vspinu commented Feb 28, 2015

Hi. I cannot reproduce this with ubuntu 14.10, firefox 34 and zotero 4.0.26.1.

> zotelo message [Mon Feb 23 13:14:15 2015]
> Collections:
> !!! TypeError: Components.classes['@zotero.org/Zotero;1'] is undefined

Looks like your zotero is not found.

Above those messages, there is also the javascript code which is run in firefox. Something like this:

var zotelo_filename=('/home/vspinu/works/reviews/Alternat_bayes_rule_2015/review.bib');
var zotelo_id = 211;
var zotelo_translator_id = '9cb70025-a888-4a29-a210-93ec52da40d4';
var zotelo_prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefService).getBranch('extensions.zotero.');
var zotelo_file = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
var zotelo_recColl = zotelo_prefs.getBoolPref('recursiveCollections');
zotelo_file.initWithPath(zotelo_filename);
//split
var zotelo_zotero = Components.classes['@zotero.org/Zotero;1'].getService(Components.interfaces.nsISupports).wrappedJSObject;
var zotelo_collection = true;
var zotelo_translator = new zotelo_zotero.Translate('export');
if (zotelo_id != 0){ //not all collections
    zotelo_collection = zotelo_zotero.Collections.get(zotelo_id);
    zotelo_translator.setCollection(zotelo_collection);
};
//split
if(zotelo_collection){
    zotelo_translator.setLocation(zotelo_file);
    zotelo_translator.setTranslator(zotelo_translator_id);
    zotelo_prefs.setBoolPref('recursiveCollections', true);
    zotelo_translator.translate();
    zotelo_prefs.setBoolPref('recursiveCollections', zotelo_recColl);
    zotelo_out=':MozOK:';
}else{
    zotelo_out='Collection with the id ' + zotelo_id + ' does not exist.';
};
//split
zotelo_out;

You should be able to run it in mozrepl or firefox console (firebug) and see what's causing your error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants