Comments (4)
Hi. I have reproduced this the following setup
OS: Ubuntu 18.04
QGIS Version : 3.6.3
Plugin Version : 3.13
The only difference was that it took about 3 - 4 minutes for the timeout to occur during which time GQIS hung - I guess linux socket timeouts are longer than windows.
Exception report on Ubuntu platform below:
An error has occurred while executing Python code:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='kf.kobotoolbox.orgapi', port=443): Max retries exceeded with url: /v2/assets/aheLFLyScVzsFRNRHPHzT4/permission-assignments/ (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 110] Connection timed out',))
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 83, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 852, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 284, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='kf.kobotoolbox.orgapi', port=443): Max retries exceeded with url: /v2/assets/aheLFLyScVzsFRNRHPHzT4/permission-assignments/ (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 110] Connection timed out',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/colin/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QRealTime/QRealTime.py", line 286, in sendForm
service.prepareSendForm(layer)
File "/home/colin/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QRealTime/QRealTime_dialog.py", line 640, in prepareSendForm
self.sendForm(layer.name(),payload)
File "/home/colin/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QRealTime/QRealTime_dialog.py", line 677, in sendForm
response3 = requests.post(urlShare, json=permissions, auth=(user,password),headers=headers)
File "/usr/lib/python3/dist-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 520, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 630, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='kf.kobotoolbox.orgapi', port=443): Max retries exceeded with url: /v2/assets/aheLFLyScVzsFRNRHPHzT4/permission-assignments/ (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 110] Connection timed out',))
Python version: 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0]
QGIS version: 3.6.3-Noosa Noosa, 0c5774c
Python Path:
/usr/share/qgis/python
/home/colin/.local/share/QGIS/QGIS3/profiles/default/python
/home/colin/.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
/home/colin/.local/lib/python3.6/site-packages
/usr/local/lib/python3.6/dist-packages
/usr/lib/python3/dist-packages
/home/colin/.local/share/QGIS/QGIS3/profiles/default/python
/home/colin/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QRealTime
/home/colin/proj/qgis-test/relations
QRealTime output:
2020-05-28T16:41:52 INFO not writing fieldsNone
2020-05-28T16:41:52 INFO 'type'None
2020-05-28T16:41:52 INFO getFieldModelTextEdit
2020-05-28T16:41:52 INFO getFieldModelTextEdit
2020-05-28T16:41:52 INFO getFieldModelTextEdit
2020-05-28T16:41:52 INFO getFieldModelTextEdit
2020-05-28T16:41:52 INFO getFieldModelExternalResource
2020-05-28T16:41:52 INFO got an image type fieldNone
2020-05-28T16:41:52 INFO getFieldModelTextEdit
2020-05-28T16:41:52 INFO getFieldModelTextEdit
2020-05-28T16:41:52 INFO getFieldModelTextEdit
2020-05-28T16:41:52 INFO getFieldModelExternalResource
2020-05-28T16:41:52 INFO got an image type fieldNone
2020-05-28T16:41:52 INFO getFieldModelTextEdit
2020-05-28T16:41:52 INFO fieldDict[{'type': 'geopoint', 'required': True, 'label': 'Point Location'}, {'name': 'id', 'label': 'id', 'type': 'integer'}, {'name': 'text1', 'label': 'text1', 'type': 'text'}, {'name': 'int1', 'label': 'int1', 'type': 'integer'}, {'name': 'decimal1', 'label': 'decimal1', 'type': 'decimal'}, {'name': 'image1', 'label': 'image1', 'type': 'image'}, {'name': 'text2', 'label': 'text2', 'type': 'text'}, {'name': 'int2', 'label': 'int2', 'type': 'integer'}, {'name': 'decimal2', 'label': 'decimal2', 'type': 'decimal'}, {'name': 'image2', 'label': 'image2', 'type': 'image'}, {'name': 'text3', 'label': 'text3', 'type': 'text'}]
2020-05-28T16:41:52 INFO Payload= {'uid': 'test-qrt-to-kobo-export', 'name': 'test-qrt-to-kobo-export', 'asset_type': 'survey', 'content': '{"survey": [{"type": "geopoint", "required": true, "label": "Point Location"}, {"name": "id", "label": "id", "type": "integer"}, {"name": "text1", "label": "text1", "type": "text"}, {"name": "int1", "label": "int1", "type": "integer"}, {"name": "decimal1", "label": "decimal1", "type": "decimal"}, {"name": "image1", "label": "image1", "type": "image"}, {"name": "text2", "label": "text2", "type": "text"}, {"name": "int2", "label": "int2", "type": "integer"}, {"name": "decimal2", "label": "decimal2", "type": "decimal"}, {"name": "image2", "label": "image2", "type": "image"}, {"name": "text3", "label": "text3", "type": "text"}], "choices": []}'}
from qrealtime.
re your comment which I can't see here:
"It seems to be network connection issue. Can you please check the server url."
In the steps to reproduce I note the url being used.
When URL is https://kf.kobotoolbox.org/
(with trailing slash) - it works ok
When URL is https://kf.kobotoolbox.org
(NO trailing slash) - it throws the error noted.
Agreed it is ultimately generating a network timeout but it is strange that the first part of the code works - it creates the form on kobo regardless, but a later bit of code fails somewhere. I wonder if the first part appends a slash if not there, but the later part does not thus creating an invalid URL that timeouts?
thanks, Colin
from qrealtime.
hi, just looking at the error again I think we can see the invalid url address being requested:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='kf.kobotoolbox.orgapi', port=443): Max retries exceeded with url: /v2/assets/a3z6GvwvPfnf5tMb3tzYCn/permission-assignments/ (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 110] Connection timed out',))
shows: host='kf.kobotoolbox.orgapi'
I suspect that is supposed to be host='kf.kobotoolbox.org/api'
C-
from qrealtime.
Thanks for exhaustive testing. Next release this bug but would also be removed
from qrealtime.
Related Issues (20)
- Submissions are not shared for koboToolbox server
- Manual HOT 1
- Additionally reading project name for creating new project in ODK Central
- I don't get the data neither in the table of attributes nor the geometry HOT 3
- "making online" a layer for a second time, an image field can get created with incorrect type.
- Import while layer is in edit mode throws Error
- Kobo export/replace xls breaks import HOT 2
- QRT defaults to using Aggregate server even though last used Kobo server HOT 2
- "Make online" no longer works HOT 8
- Importing data with repeat groups HOT 1
- Import media filenames not just URLs from Kobo (and maybe Central) HOT 1
- spatialite fields with name len > 10 no longer imported! HOT 3
- Layer form field order not respected in 'make online'
- QRealTime settings window is too small (UI issue) HOT 2
- Cant "Make Online" a Geopackage layer HOT 3
- 404.1 error when Importing from ODK Central 1.5 HOT 1
- Install error in qgis v 3.28.5 HOT 1
- Connection to other servers HOT 5
- Add new Features
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qrealtime.