Skip to content

TypeError when trying to save a file #31

@akhmerov

Description

@akhmerov

It appears, that some modifications were only performed partially. When trying to save files, I see the following error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/viscm/gui.py", line 1315, in save
    self.viscm_editor.save_colormap(fileName)
  File "/usr/local/lib/python3.5/dist-packages/viscm/gui.py", line 599, in save_colormap
    with open(filepath, 'w') as f:
TypeError: invalid file: ('.../test.jscm', 'JSCM Files (*.jscm)')
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/viscm/gui.py", line 1315, in save
    self.viscm_editor.save_colormap(fileName)
  File "/usr/local/lib/python3.5/dist-packages/viscm/gui.py", line 599, in save_colormap
    with open(filepath, 'w') as f:
TypeError: invalid file: ('', '')
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/viscm/gui.py", line 1303, in export
    self.viscm_editor.export_py(fileName)
  File "/usr/local/lib/python3.5/dist-packages/viscm/gui.py", line 648, in export_py
    with open(filepath, 'w') as f:
TypeError: invalid file: ('.../cm.py', '.py (*.py)')

I believe only the first element of corresponding tuples should be passed to open.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions