enricofer / go2streetview

22 stars 22 forks source link

plugin stopped to work #7

Closed enricofer closed 8 years ago

enricofer commented 9 years ago

Hi Enrico, first of all thanks for your great work. I am a technical operator in Italy, and I work in the City hall of a small town. A user of mine has installed on QGis your plugin. He said that few days ago the plugin stopped to work. When I help him, it seems that the plugin gives back a white window either careless of what point of view I am giving or switching between "bird's eye" and "street view". In addiction, when I click "open in browser", the plugin gives me a python error.

What could it be? Could it be the proxy? I personally doubt it, because first of all we didn't changed the proxy since many months ago, secondly because the error did not say anything about proxy or connection denied.

If you could help me understand what is the problem, I would be graceful. Thanks in advance

Eugenio Grimoldi

The version of QGis is the QGIS Chugiak 2.4.0 Chugiak The version of the plugin is both 5.0 and 5.1 (we unistall the 5.0 and install the newer)

enricofer commented 9 years ago

The Issue you report is strange. In effects appears to be a connection problem. Perhaps depends from Proxy settings. Are you sure that nothing is Changed in the proxy connection? Do you use automatic proxy configuration? I suggest you to explicitly declare proxy settings (server, port, user and password) in the option dialog in qgis "Settings" menu. I'm thinking also to a google service deny. Are you using massively the plugin? In this case you have to know that you have a limit of monthly donwloads ( I remember 25000, but I'm not sure). It is not so difficult to bypass this limit if many people use it behind the same IP. Google stats a download every view or zoom replacement. If you want more downloads you have to subscribe... But in this case appears a message with a broken view in the middle....

Grimoldi commented 9 years ago

Sorry if I'm late to answer, but it took several days before my user can check if it worked. We control the proxy and it hasn't been modified for one or two months.

While checking the configuration file, I edit in this way:

FROM s = QSettings() #getting proxy from qgis options settings proxyEnabled = s.value("proxy/proxyEnabled", "") proxyType = s.value("proxy/proxyType", "" ) proxyHost = s.value("proxy/proxyHost", "" ) proxyPort = s.value("proxy/proxyPort", "" ) proxyUser = s.value("proxy/proxyUser", "" ) proxyPassword = s.value("proxy/proxyPassword", "" )

print proxyEnabled+"; "+proxyType+"; "+proxyHost+"; " + proxyPort+"; " + proxyUser+"; " +"*****; "

if proxyEnabled == "true": # test if there are proxy settings proxy = QNetworkProxy() if proxyType == "DefaultProxy": proxy.setType(QNetworkProxy.DefaultProxy) elif proxyType == "Socks5Proxy": proxy.setType(QNetworkProxy.Socks5Proxy) elif proxyType == "HttpProxy": proxy.setType(QNetworkProxy.HttpProxy) elif proxyType == "HttpCachingProxy": proxy.setType(QNetworkProxy.HttpCachingProxy) elif proxyType == "FtpCachingProxy": proxy.setType(QNetworkProxy.FtpCachingProxy) proxy.setHostName(proxyHost) proxy.setPort(int(proxyPort)) proxy.setUser(proxyUser) proxy.setPassword(proxyPassword) QNetworkProxy.setApplicationProxy(proxy)

TO:

s = QSettings() #getting proxy from qgis options settings proxyEnabled = s.value("proxy/proxyEnabled", "") proxyType = s.value("proxy/proxyType", "" ) proxyHost = s.value("proxy/proxyHost", "" ) proxyPort = s.value("proxy/proxyPort", "" ) proxyUser = s.value("proxy/proxyUser", "" ) proxyPassword = s.value("proxy/proxyPassword", "" )

print proxyEnabled+"; "+proxyType+"; "+proxyHost+"; " + proxyPort+"; " + proxyUser+"; " +"*****; "

if proxyEnabled == "true": # test if there are proxy settings proxy = QNetworkProxy() if proxyType == "DefaultProxy": proxy.setType(QNetworkProxy.DefaultProxy) elif proxyType == "Socks5Proxy": proxy.setType(QNetworkProxy.Socks5Proxy) elif proxyType == "HttpProxy": proxy.setType(QNetworkProxy.HttpProxy) elif proxyType == "HttpCachingProxy": proxy.setType(QNetworkProxy.HttpCachingProxy) elif proxyType == "FtpCachingProxy": proxy.setType(QNetworkProxy.FtpCachingProxy) proxy.setHostName(172.16.0.251) <- THIS proxy.setPort(int(3128)) <- THIS proxy.setUser(proxyUser) proxy.setPassword(proxyPassword) QNetworkProxy.setApplicationProxy(proxy)

So I just edit the file adding the address and the port of our proxy. May I have to change the ProxyEnable field

FROM proxyEnabled = s.value("proxy/proxyEnabled", "")

TO proxyEnabled = s.value("true", "") or something like this?

We don't have a proxy user, nor a password (of course).

If you could help me I really would appreciate. Thanks

enricofer commented 9 years ago

The procedure you modified sets the plugin proxy setting getting reading them from the application registry. This means that the plugin is proxied with the same parameters you set in the network section of qgis options. Modifing this portion of code does not bring to a solution. As you are the only reporting this problem I fear you crossed Google Maps limits with download requests... A question: Does The problem appear in all the workstation in your network?

2015-03-03 12:53 GMT+01:00 Grimoldi notifications@github.com:

Sorry if I'm late to answer, but it took several days before my user can check if it worked. We control the proxy and it hasn't been modified for one or two months.

While checking the configuration file, I edit in this way:

FROM s = QSettings() #getting proxy from qgis options settings proxyEnabled = s.value("proxy/proxyEnabled", "") proxyType = s.value("proxy/proxyType", "" ) proxyHost = s.value("proxy/proxyHost", "" ) proxyPort = s.value("proxy/proxyPort", "" ) proxyUser = s.value("proxy/proxyUser", "" ) proxyPassword = s.value("proxy/proxyPassword", "" )

print proxyEnabled+"; "+proxyType+"; "+proxyHost+"; " + proxyPort+"; " +

proxyUser+"; " +"*****; "

if proxyEnabled == "true": # test if there are proxy settings proxy = QNetworkProxy() if proxyType == "DefaultProxy": proxy.setType(QNetworkProxy.DefaultProxy) elif proxyType == "Socks5Proxy": proxy.setType(QNetworkProxy.Socks5Proxy) elif proxyType == "HttpProxy": proxy.setType(QNetworkProxy.HttpProxy) elif proxyType == "HttpCachingProxy": proxy.setType(QNetworkProxy.HttpCachingProxy) elif proxyType == "FtpCachingProxy": proxy.setType(QNetworkProxy.FtpCachingProxy) proxy.setHostName(proxyHost) proxy.setPort(int(proxyPort)) proxy.setUser(proxyUser) proxy.setPassword(proxyPassword) QNetworkProxy.setApplicationProxy(proxy)

TO:

s = QSettings() #getting proxy from qgis options settings proxyEnabled = s.value("proxy/proxyEnabled", "") proxyType = s.value("proxy/proxyType", "" ) proxyHost = s.value("proxy/proxyHost", "" ) proxyPort = s.value("proxy/proxyPort", "" ) proxyUser = s.value("proxy/proxyUser", "" ) proxyPassword = s.value("proxy/proxyPassword", "" )

print proxyEnabled+"; "+proxyType+"; "+proxyHost+"; " + proxyPort+"; " +

proxyUser+"; " +"*****; "

if proxyEnabled == "true": # test if there are proxy settings proxy = QNetworkProxy() if proxyType == "DefaultProxy": proxy.setType(QNetworkProxy.DefaultProxy) elif proxyType == "Socks5Proxy": proxy.setType(QNetworkProxy.Socks5Proxy) elif proxyType == "HttpProxy": proxy.setType(QNetworkProxy.HttpProxy) elif proxyType == "HttpCachingProxy": proxy.setType(QNetworkProxy.HttpCachingProxy) elif proxyType == "FtpCachingProxy": proxy.setType(QNetworkProxy.FtpCachingProxy) proxy.setHostName(172.16.0.251) <- THIS proxy.setPort(int(3128)) <- THIS proxy.setUser(proxyUser) proxy.setPassword(proxyPassword) QNetworkProxy.setApplicationProxy(proxy)

So I just edit the file adding the address and the port of our proxy. May I have to change the ProxyEnable field

FROM proxyEnabled = s.value("proxy/proxyEnabled", "")

TO proxyEnabled = s.value("true", "") or something like this?

We don't have a proxy user, nor a password (of course).

If you could help me I really would appreciate. Thanks

— Reply to this email directly or view it on GitHub https://github.com/enricofer/go2streetview/issues/7#issuecomment-76932236 .

Grimoldi commented 9 years ago

I have hust one user that use the plugin and with his own pc, so I can't answer to your question.

enricofer commented 9 years ago

It's difficult to help you. I need more infos: 1) Install Qgis web connector: http://plugins.qgis.org/plugins/qgisWebConnector/ and let me know about all the provided connections. The plugin has the same proxy procedure of go2streetview 2) Install openLayers plugin: http://plugins.qgis.org/plugins/openlayers_plugin/ and let me know the basemaps are all right.

2015-03-04 11:07 GMT+01:00 Grimoldi notifications@github.com:

I have hust one user that use the plugin and with his own pc, so I can't answer to your question.

— Reply to this email directly or view it on GitHub https://github.com/enricofer/go2streetview/issues/7#issuecomment-77128500 .

enricofer commented 9 years ago

I got no feedback.

enricofer commented 8 years ago

Could you try the last development release to verify if the issues you reported are fixed? I redeveloped connections procedure and fixed some bugs. https://github.com/enricofer/go2streetview/archive/master.zip