DOI-USGS / fort-pymdwizard

The MetadataWizard is a useful tool designed to facilitate FGDC metadata creation for spatial and non-spatial data sets. It is a cross-platform desktop application built using an open-source Python architecture.
https://usgs.github.io/fort-pymdwizard/
Other
65 stars 22 forks source link

Creating new document on macOS results in crash #101

Closed dnowacki-usgs closed 6 years ago

dnowacki-usgs commented 6 years ago

pymdwizard 2.0.4 macOS 10.12.6

Steps to reproduce:

  1. Open pymdwizard
  2. File -> New
  3. Enter any filename in Save As dialog
  4. Crash with following error:
<class 'TypeError'> stat: path should be string, bytes, os.PathLike or integer, not NoneType <traceback object at 0x12c612ac8>
Traceback (most recent call last):
  File "pymdwizard/gui/MainWindow.py", line 408, in new_record
    if not os.path.exists(template_fname):
  File "/Users/dnowacki/miniconda3/envs/pymdwizard/lib/python3.6/genericpath.py", line 19, in exists
    os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
ColinTalbert commented 6 years ago

Ouch. The value returned from an unset settings went from the empty string to a None type at some point. Fixed with: 033d356f87f001cf554fa3a4d2f129dc6f36c386

ColinTalbert commented 6 years ago

Thank you for reporting this!