deparkes / OOMMFTools

OOMMFTools is a set of utilities designed to assist OOMMF postprocessing
GNU General Public License v2.0
18 stars 8 forks source link

[OOMMFDecode] export file dialogue not working #18

Closed giuliocandre closed 6 years ago

giuliocandre commented 6 years ago

Hello, I'm trying to convert a .ovf file to .mat using OOMMFDecode. After dragging and dropping the relevant file to the GUI window, I get the following error on console:

    dlg = wx.FileDialog(self, 'Export MATLAB Data', LASTPATH, "", "MATLAB Data (*.mat)|*.mat", wx.SAVE)
AttributeError: 'module' object has no attribute 'SAVE'

where the previous call has been triggered by MainFrame.gatherData()

Note:

>>> import wx
>>> print wx.__version__
4.0.0b2
python --version
Python 2.7.10
deparkes commented 6 years ago

Thanks for reporting this. I think the issue here is that OOMMFTools was written for wxpython 3 and you are using version 4.

Are you able to try again with wxpython 3? Version 3 is no longer available on PyPI, but can be installed with conda (conda install -c conda-forge wxpython) or from source forge (https://sourceforge.net/projects/wxpython/files/wxPython/).

It would be good to migrate to wxpython version 4, but I'm not sure when that is likely to happen...

deparkes commented 6 years ago

I've tried to fix this in the development branch: https://github.com/deparkes/OOMMFTools/tree/oommftools_dev.

I've just about got it working for me, but would you be able to try using this version?