enricofer / QgisODK

GNU General Public License v3.0
16 stars 5 forks source link

Plugin fails to load on QGIS 2.14 #3

Closed timlinux closed 7 years ago

timlinux commented 7 years ago

I really like the look of your plugin. However on first install I get a bunch of errors:

screen shot 2016-12-20 at 12 03 19 pm

QGIS Version: 2.14.8 OS: MacOS Sierra

It would be great if you could support the LTR version of QGIS with such a potentially important plugin.

enricofer commented 7 years ago

Hi Tim, thanks for your submission, I tested the plugin installation on clean Windows (qgis 2.14.3 32 bit) and Ubuntu(2.18.1 32 and 64 bit) systems without the reported issue. At the moment I haven't a MacOs test machine and I can't figure why valueFromSettings does not get defaultValue so I ask you to check if a simple patch resolvs. Could you please edit row 309 modifying it from:

    if valueFromSettings == "undef":

to

    if not valueFromSettings or valueFromSettings == "undef":

I started the plugin development for managing a little survey from my office, but I soon realized that could have wider public interest so I extend it with many other functionalities, without having a real external support, so I welcome any suggestion even your LTR support proposal. But what do you mean in detail?

timlinux commented 7 years ago

Hi

Thanks. Indeed your fix above solves the loading problem! Thanks - I will report any other issues I find.

I didn't have a proposal, it was more a request to make sure it works well with the QGIS LTR (2.14) version so that it has the broadest possible audience. Thanks!

enricofer commented 7 years ago

https://github.com/enricofer/QgisODK/commit/8bcd4fcd0eb1c5f5d67a0099ca10531165cbd781 fixed

abhijitekbote commented 7 years ago

Hi, this seems to be great plugin! I have used ODK separately and its integration with QGIS will make life easy. Though I am unable to use it as i get a message "plugin is broken". I am using Mac OS X 10.9.5 and QGIS 2.14 I am using the Plugin Manager to install the plugin. Thanks!

enricofer commented 7 years ago

This issue seemed to be closed... Two questions: 1) Are you installing the last release of the plugin (1.5) from repository? 2) Could you provide the complete "plugin is broken" error message?

abhijitekbote commented 7 years ago

Yes, I am installing the version 1.5 through Plugin Manager

The message is: odk_error

Thanks.

enricofer commented 7 years ago

It appears that the "requests" library is not yet installed your system. To install it you should open your terminal console and type:

pip install requests

have a look to requests site for details

abhijitekbote commented 7 years ago

I did that in the terminal window and it did install something.

After that I reopened QGIS and tried installing QgisODK, but again getting the same error :(

enricofer commented 7 years ago

Could you send me terminal?

abhijitekbote commented 7 years ago

cpe-172-100-1-38:~ abhijitekbote$ pip install requests Downloading/unpacking requests Downloading requests-2.12.4-py2.py3-none-any.whl (576kB): 576kB downloaded Installing collected packages: requests Successfully installed requests Cleaning up... cpe-172-100-1-38:~ abhijitekbote$

enricofer commented 7 years ago

now could you type from console: python2.7 and then import requests and send me back terminal results

abhijitekbote commented 7 years ago

python_requests

abhijitekbote commented 7 years ago

Sorry, I think you meant the Python console in QGIS.... Here it is:

Python Console Use iface to access QGIS API interface or Type help(iface) for more info python2.7 File "", line 1 python2.7 ^ SyntaxError: invalid syntax python2.7 File "", line 1 python2.7 ^ SyntaxError: invalid syntax

enricofer commented 7 years ago

No, in Qgis python console suffits to type only: import requests

abhijitekbote commented 7 years ago

import requests Traceback (most recent call last): File "", line 1, in File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 572, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ImportError: No module named requests

enricofer commented 7 years ago

I'm not a python expert and I don't work on Mac OS but It appears that Your QGIS does not make use of Mac OS system python, you should try following this: http://gis.stackexchange.com/questions/216848/pyspatialite-installation-error-on-macosx-qgis-plugin adapting the instructions to your case.

abhijitekbote commented 7 years ago

Ok.. I will try doing that.. thank you so much.