Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python error when clicking "edit" on style #54

Open
gioman opened this issue Dec 2, 2016 · 2 comments
Open

Python error when clicking "edit" on style #54

gioman opened this issue Dec 2, 2016 · 2 comments
Labels

Comments

@gioman
Copy link
Contributor

gioman commented Dec 2, 2016

This happens if the layer (for example a point one) has been imported with a SVG symbology:

IOError: [Errno 22] invalid mode ('r') or filename: u'' 
Traceback (most recent call last):
  File "C:/Users/qgis/.qgis2/python/plugins\geoserverexplorer\gui\gsexploreritems.py", line 1112, in 
    editStyleAction.triggered.connect(lambda: self.editStyle(tree, explorer, self.parent().element))
  File "C:/Users/qgis/.qgis2/python/plugins\geoserverexplorer\gui\gsexploreritems.py", line 1177, in editStyle
    oldSld = getGsCompatibleSld(layer)[0]
  File "C:/Users/qgis/.qgis2/python/plugins\geoserverexplorer\qgis\sldadapter.py", line 212, in getGsCompatibleSld
    return adaptQgsToGs(sld, layer)
  File "C:/Users/qgis/.qgis2/python/plugins\geoserverexplorer\qgis\sldadapter.py", line 89, in adaptQgsToGs
    icons = getReadyToUploadSvgIcons(renderer.symbol())
  File "C:/Users/qgis/.qgis2/python/plugins\geoserverexplorer\qgis\sldadapter.py", line 114, in getReadyToUploadSvgIcons
    with open(sl.path()) as f:
IOError: [Errno 22] invalid mode ('r') or filename: u''
@gioman gioman added the bug label Dec 2, 2016
@gioman
Copy link
Contributor Author

gioman commented Mar 23, 2017

cannot check if this is still valid because of #68 @volaya

@gioman
Copy link
Contributor Author

gioman commented May 4, 2017

On master revision code against GS 2.11 the error is now

IOError: [Errno 2] No such file or directory: u'' 
Traceback (most recent call last):
  File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/gui/gsexploreritems.py", line 1130, in 
    editStyleAction.triggered.connect(lambda: self.editStyle(tree, explorer))
  File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/gui/gsexploreritems.py", line 1186, in editStyle
    oldSld = getGsCompatibleSld(layer)[0]
  File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/qgis/sldadapter.py", line 219, in getGsCompatibleSld
    return adaptQgsToGs(sld, layer)
  File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/qgis/sldadapter.py", line 96, in adaptQgsToGs
    icons = getReadyToUploadSvgIcons(renderer.symbol())
  File "/home/giovanni/.qgis2/python/plugins/geoserverexplorer/qgis/sldadapter.py", line 121, in getReadyToUploadSvgIcons
    with open(sl.path()) as f:
IOError: [Errno 2] No such file or directory: u''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant