2

I haven't been able to successfully use the QGIS MetaTools plugin for describing metadata. Has anyone used it before? When I try to create metadata for a shapefile, the plugin creates the xml file but then I get a python error:

An error has occured while executing Python code:

Traceback (most recent call last):
File "C:/Users/daniel/.qgis2/python/plugins\metatools\metatools.py", line 267, in doEdit
standard = MetaInfoStandard.tryDetermineStandard(self.metaProvider)
File "C:/Users/daniel/.qgis2/python/plugins\metatools\standard.py", line 35, in tryDetermineStandard
print "TryDetStd ", text, " Text"
IOError: [Errno 9] Bad file descriptor

I'm using QGIS 2.4.0-Chugiak Chugiak, installed from the OSGeo4W installer with python version 2.7.4. Has anyone seen this error?

0

I have encountered the same issue in QGIS 2.4 x64 on Windows 7. Following a comment on the qgis-user list I can confirm that having the Python console open whilst running Metatools seems to stop the error from occurring. I don't know why at this stage though!

UPDATE: The Python Console doesn't need to be open when running Metatools, it merely needs to have been opened (and can immediately be closed) in the current QGIS session...

UPDATE #2: Commenting out line 35 in metatools\standard.py (the offending line in the error message) prevents the error from occuring, and to date hasn't affected the working of the tool

  • Confirmed. Just tested Metatools after opening (and closing) the Python console and the plugging worked. Is there a place we could report this as a bug so it gets fixed? – Daniel Oct 22 '14 at 10:54
  • I have looked myself and not found an obvious location. Note that I can correct the bug in the plugin code now (see answer - update #2) and I'll try to get the repository updated via a Github pull request to the repository. – Andy Harfoot Oct 27 '14 at 10:25
  • 1
    I have made the change noted in my answer above and submitted a pull request to the owner of the plugin. – Andy Harfoot Oct 30 '14 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.