Cant import gourmet xml file

Asked by Anil Duggirala

Im using Gourmet 0.17.0 in Debian wheezy, I installed the dependencies missing and did the installation procedure.
When trying to import recipes from my .xml file created with 0.15.9 I get

Doing import for /home/anil/Desktop/recipes.xml <gxml_plugin.gxml_importer_plugin.GourmetXML2Plugin instance at 0x3b9b710>
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gourmet/GourmetRecipeManager.py", line 722, in do_import
    self.importManager.offer_import(self.window)
  File "/usr/local/lib/python2.7/dist-packages/gourmet/importers/importManager.py", line 117, in offer_import
    self.import_filenames(filenames)
  File "/usr/local/lib/python2.7/dist-packages/gourmet/importers/importManager.py", line 152, in import_filenames
    self.do_import(importer_plugin,'get_importer',fn)
  File "/usr/local/lib/python2.7/dist-packages/gourmet/importers/importManager.py", line 161, in do_import
    importer = getattr(importer_plugin,method)(*method_args)
  File "/usr/local/lib/python2.7/dist-packages/gourmet/plugins/import_export/gxml_plugin/gxml_importer_plugin.py", line 70, in get_importer
    return gxml2_importer.Converter(filename)
  File "/usr/local/lib/python2.7/dist-packages/gourmet/plugins/import_export/gxml_plugin/gxml2_importer.py", line 78, in __init__
    name='GXML2 Importer')
  File "/usr/local/lib/python2.7/dist-packages/gourmet/importers/xml_importer.py", line 48, in __init__
    self.rh = recHandler(conv=conv,parent_thread=self)
  File "/usr/local/lib/python2.7/dist-packages/gourmet/plugins/import_export/gxml_plugin/gxml2_importer.py", line 18, in __init__
    self.REC_ATTRS = [r[0] for r in REC_ATTRS]
NameError: global name 'REC_ATTRS' is not defined

Please help !!

Question information

Language:
English Edit question
Status:
Solved
For:
Gourmet Edit question
Assignee:
No assignee Edit question
Solved by:
Bernhard Reiter
Solved:
Last query:
Last reply:
Revision history for this message
Best Bernhard Reiter (ockham-razor) said :
#1

That's a known bug in 0.17.0, which has been fixed since. Please download 0.17.2 and try again.

-------- Ursprüngliche Nachricht --------
Von: Felipe Casta <email address hidden>
Datum:
An: <email address hidden>
Betreff: [Question #245850]: Cant import gourmet xml file

New question #245850 on Gourmet:
https://answers.launchpad.net/gourmet/+question/245850

Im using Gourmet 0.17.0 in Debian wheezy, I installed the dependencies missing and did the installation procedure.
When trying to import recipes from my .xml file created with 0.15.9 I get

Doing import for  /home/anil/Desktop/recipes.xml <gxml_plugin.gxml_importer_plugin.GourmetXML2Plugin instance at 0x3b9b710>
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gourmet/GourmetRecipeManager.py", line 722, in do_import
    self.importManager.offer_import(self.window)
  File "/usr/local/lib/python2.7/dist-packages/gourmet/importers/importManager.py", line 117, in offer_import
    self.import_filenames(filenames)
  File "/usr/local/lib/python2.7/dist-packages/gourmet/importers/importManager.py", line 152, in import_filenames
    self.do_import(importer_plugin,'get_importer',fn)
  File "/usr/local/lib/python2.7/dist-packages/gourmet/importers/importManager.py", line 161, in do_import
    importer = getattr(importer_plugin,method)(*method_args)
  File "/usr/local/lib/python2.7/dist-packages/gourmet/plugins/import_export/gxml_plugin/gxml_importer_plugin.py", line 70, in get_importer
    return gxml2_importer.Converter(filename)
  File "/usr/local/lib/python2.7/dist-packages/gourmet/plugins/import_export/gxml_plugin/gxml2_importer.py", line 78, in __init__
    name='GXML2 Importer')
  File "/usr/local/lib/python2.7/dist-packages/gourmet/importers/xml_importer.py", line 48, in __init__
    self.rh = recHandler(conv=conv,parent_thread=self)
  File "/usr/local/lib/python2.7/dist-packages/gourmet/plugins/import_export/gxml_plugin/gxml2_importer.py", line 18, in __init__
    self.REC_ATTRS = [r[0] for r in REC_ATTRS]
NameError: global name 'REC_ATTRS' is not defined

Please help !!

--
You received this question notification because you are a member of
Gourmet Recipe Manager, which is an answer contact for Gourmet.

Revision history for this message
Anil Duggirala (anilduggirala) said :
#2

thanks, that worked, I will check bug lists before next time.
I hope I wont have trouble exporting new recipes I add in my new instance of gourmet, that would be bad.

Revision history for this message
Bernhard Reiter (ockham-razor) said :
#3

Nevermind. (The bug report's at https://github.com/thinkle/gourmet/issues/741)
Anyway, if anything's wrong with exporting, just post a question or bug report.

-------- Ursprüngliche Nachricht --------
Von: Felipe Casta <email address hidden>
Datum:
An: <email address hidden>
Betreff: Re: [Question #245850]: Cant import gourmet xml file

Question #245850 on Gourmet changed:
https://answers.launchpad.net/gourmet/+question/245850

    Status: Answered => Solved

Felipe Casta confirmed that the question is solved:
thanks, that worked, I will check bug lists before next time.
I hope I wont have trouble exporting new recipes I add in my new instance of gourmet, that would be bad.

--
You received this question notification because you are a member of
Gourmet Recipe Manager, which is an answer contact for Gourmet.