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

QGIS 3.2.1 - saving project file creates error when javascript api based layer is loaded #59

Open
dtvkoe opened this issue Jul 24, 2018 · 4 comments

Comments

@dtvkoe
Copy link

dtvkoe commented Jul 24, 2018

If the project contains a layer that is based on a javascript API, saving the QGIS project file is not possible anymore.

While pressing on the save button the following python error occurs:

An error has occurred while executing Python code: 

TypeError: writeXml() takes 3 positional arguments but 4 were given 
TypeError: writeXml() takes 3 positional arguments but 4 were given


Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] 
QGIS version: 3.2.1-Bonn Bonn, 1edf372fb8 

Python Path:
C:/OSGEO4~1/apps/qgis/./python
C:/Users/MYUSER/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/MYUSER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/OSGEO4~1/apps/qgis/./python/plugins
C:\OSGeo4W64\bin\python36.zip
C:\OSGEO4~1\apps\Python36\DLLs
C:\OSGEO4~1\apps\Python36\lib
C:\OSGeo4W64\bin
C:\OSGEO4~1\apps\Python36
C:\OSGEO4~1\apps\Python36\lib\site-packages
C:\OSGEO4~1\apps\Python36\lib\site-packages\win32
C:\OSGEO4~1\apps\Python36\lib\site-packages\win32\lib
C:\OSGEO4~1\apps\Python36\lib\site-packages\Pythonwin
C:/Users/MYUSER/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users\MYUSER\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins
D:/Daten/QGIS

QGIS remembers the project file as saved but after opening the project file again a javascript api based layer is gone.

I've encountered this problem when loading "Google Streets" and "Bing Roads" layer.

This problem doesn't occur when adding layers like "OpenStreetMap" which are not javascript base.

I also don't have this problem when using QGIS 2.18.22.

@rizwanbpatel
Copy link

Issue is occurring on QGis 3.4* version as well - Specifically working with the

OpenLayers Plugin - Bing Roads

An error has occurred while executing Python code: 

TypeError: writeXml() takes 3 positional arguments but 4 were given 
TypeError: writeXml() takes 3 positional arguments but 4 were given


Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] 
QGIS version: 3.4.1-Madeira Madeira, 383851c597 

Python Path:
C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python
C:/Users/nomd/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/nomd/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins
C:\PROGRA~1\QGIS3~1.4\bin\python37.zip
C:\PROGRA~1\QGIS3~1.4\apps\Python37\DLLs
C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib
C:\PROGRA~1\QGIS3~1.4\bin
C:\PROGRA~1\QGIS3~1.4\apps\Python37
C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages
C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\win32
C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\Pythonwin
C:/Users/nomd/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/nomd/qgis

@oponcea
Copy link

oponcea commented Apr 20, 2019

I can confirm this for 3.6 under Ubuntu 18.04 as well. It looks like the problem originates in the OpenLayer plugin.

An error has occurred while executing Python code: 

TypeError: writeXml() takes 3 positional arguments but 4 were given 
TypeError: writeXml() takes 3 positional arguments but 4 were given


Python version: 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0] 
QGIS version: 3.6.2-Noosa Noosa, 656500e 

Python Path:
/usr/share/qgis/python
/home/ovidiu/.local/share/QGIS/QGIS3/profiles/default/python
/home/ovidiu/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python36.zip
/usr/lib/python3.6
/usr/lib/python3.6/lib-dynload
/usr/local/lib/python3.6/dist-packages
/usr/lib/python3/dist-packages
/home/ovidiu/.local/share/QGIS/QGIS3/profiles/default/python

@void32
Copy link

void32 commented Jul 4, 2019

I have seen this as well with QGIS 3.6.2-Noosa on Windows 10.

@twingkle
Copy link

twingkle commented Oct 1, 2020

I have this problem with QGIS 3.10.7 on Window 10 too.

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

No branches or pull requests

5 participants