YoannQDQ / qgis-memory-layer-saver

Makes data in memory provider layers persistent between QGIS sessions. Data saved in .mldata file alongside project file.
Other
7 stars 4 forks source link

Error when saving the QGIS project #6

Closed Malauch closed 6 years ago

Malauch commented 6 years ago

When I try to save project with some memory layer I get Python error message as below:

2018-08-04T17:02:22     WARNING    Traceback (most recent call last):
              File "/Users/michaljurewicz/Library/Application Support/QGIS/QGIS3/profiles/Profil2/python/plugins/MemoryLayerSaver/MemoryLayerSaver.py", line 309, in saveData
              with Writer(filename) as writer:
              File "/Users/michaljurewicz/Library/Application Support/QGIS/QGIS3/profiles/Profil2/python/plugins/MemoryLayerSaver/MemoryLayerSaver.py", line 26, in __enter__
              self.open()
              File "/Users/michaljurewicz/Library/Application Support/QGIS/QGIS3/profiles/Profil2/python/plugins/MemoryLayerSaver/MemoryLayerSaver.py", line 34, in open
              print("Filename: {0}".format(self._filename))
             UnicodeEncodeError: 'ascii' codec can't encode character '\u0301' in position 73: ordinal not in range(128)
Malauch commented 6 years ago

After more tries I have found that the problem is when project name contains any not standard ASCII characters.

ccrook commented 6 years ago

@Malauch Thanks for noticing this and for identifying the issue.

ccrook commented 6 years ago

@Malauch Should be fixed in version 4.0.2 - the problem was with some debugging code that was still in the plugin. See if it works for you...

rjwillson commented 6 years ago

love this plugin!

any thoughts about the possibility of having the .mldata file being stored right in the .qgz file so that everything is contained in the one file?

Malauch commented 6 years ago

I can confirm that it's fixed now

ccrook commented 6 years ago

@rjwillson Interesting thought Rob - I hadn't considered this but will look at the feasibility of doing so...