-
Notifications
You must be signed in to change notification settings - Fork 31
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
Encoding issues on Mac OSX for metadata.txt #91
Comments
Hi team, Please would you help me resolve the issues with installing and running ORS Tools. I've tried installing from the QGIS plugin repository AND by downloading the zip file and keep getting the following error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 155: ordinal not in range(128) Python version: 3.6.6 (v3.6.6:4cf1f54eb7, Jun 26 2018, 19:50:54) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] Python Path: Kind regards Gillian |
Looks very much you have encoding problems. Seems a little weird, since this Python 3.x, which should default strings to UTF-8. Anyways, might be the I patched real quick. Can you please try branch |
Dear Nils,
Thank you so much for your prompt reply.
I’m still not having any luck but I suspect it is as much due to my ignorance of coding as anything else.
I’ve tried installing the patch from the link and reinstalling ORS both from the plugin manager and the zip file.
I’ve also tried loading the plugin on different versions of QGIS (QGIS3 Madeira; QGIS 3.6 Noosa; and QGIS 2.18 Palma)
Would you please walk me through what I should be doing step by step.
I would like to use it for a health service access paper I’m writing as part of my Phd.
Kind regards
Gillian
… On 7 Mar 2019, at 5:53 am, Nils ***@***.***> wrote:
Looks very much you have encoding problems. Seems a little weird, since this Python 3.x, which should default strings to UTF-8. Anyways, might be the configparser has problems (on Mac only? After 800 downloads this is the first I hear about it).
I patched real quick. Can you please try branch hotfix-#91-encoding_problems <https://github.com/nilsnolde/orstools-qgis-plugin/archive/hotfix-%2391-encoding_problems.zip>? It's the ZIP, but seems like you know what to do with it. Please let me know if this fixed your issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#91 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AuCdLge1hn7NR5CqxsOMR7djXeL7w6Syks5vUDjzgaJpZM4bgO4D>.
|
What, still the same error? And you tried the patched zip file, you're sure? You have to uninstall and re-install the new patch with the zip. Can you pls paste the error output again? |
Hi Nils,
Sorry to cause problems
When I tried to install the patch from the zip file I get this message:
An error occurred during execution of following code:
pyplugin_installer.instance().installFromZipFile(r'/Users/gillianjean/Downloads/orstools-qgis-plugin-hotfix-91-encoding_problems.zip')
traceback.print_exception() failed
Python version:
QGIS version:
3.6.0-Noosa 'Noosa', exported
Python path:
When I try and install either through the plug in manager or through the zip file I get this message:
Couldn't load plugin 'ORStools'
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 155: ordinal not in range(128)
Traceback (most recent call last):
File "/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 309, in loadPlugin
__import__(packageName)
File "/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/Users/gillianjean/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ORStools/__init__.py", line 59, in
METADATA.read(os.path.join(BASE_DIR, 'metadata.txt'))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/configparser.py", line 697, in read
self._read(fp, filename)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/configparser.py", line 1015, in _read
for lineno, line in enumerate(fp, start=1):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 155: ordinal not in range(128)
Python version: 3.6.6 (v3.6.6:4cf1f54eb7, Jun 26 2018, 19:50:54) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
QGIS version: 3.6.0-Noosa Noosa, exported
Python Path:
/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python
/Users/gillianjean/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/gillianjean/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/plugins
/Library/Frameworks/SQLite3.framework/Versions/E/Python/3.6
/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
/Users/gillianjean/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/gillianjean/Documents/PhD/Rural and Remote Health
What doesn’t make sense …..and this is why I think its probably something I’ve done….. the first time I tried to load openroutservice it loaded fine. I requested an API and when I tried to run the query it all disappeared and hasn’t worked since.
Could it be that I exceeded the free quota and so I’ve been locked out?
I’ve sent an email to your support team to ask about batch processing cost, bearing in mind I am a PhD student so by definition have little money!
It could also be that what I am asking openrouteservice to do is not realistic. I want to calculate shortest travel time from population centroid (point geometry latitude and longitude) to nearest health clinic. Problem is there are 55000 population points and 250 clinics. I only want the distance from each centroid to the nearest clinic. I was hoping that open route service would be the right software to use.
Kind regards
Gillian
… On 7 Mar 2019, at 5:53 am, Nils ***@***.***> wrote:
Looks very much you have encoding problems. Seems a little weird, since this Python 3.x, which should default strings to UTF-8. Anyways, might be the configparser has problems (on Mac only? After 800 downloads this is the first I hear about it).
I patched real quick. Can you please try branch hotfix-#91-encoding_problems <https://github.com/nilsnolde/orstools-qgis-plugin/archive/hotfix-%2391-encoding_problems.zip>? It's the ZIP, but seems like you know what to do with it. Please let me know if this fixed your issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#91 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AuCdLge1hn7NR5CqxsOMR7djXeL7w6Syks5vUDjzgaJpZM4bgO4D>.
|
You're not loading the new patch version. I patched only this line of code (it's in your error):
You'll have to uninstall the ORS Tools plugin that you installed from the plugin manager. And install the ZIP verison I linked above! That line has to read
For the rest: your problem is not your fault. There's some shit going on with your encoding on your system, but it's beyond me why it would do that. The last resort is to re-install QGIS. That's not normal behavior. 50000 x 250 you'll calculate within 3 days on the free quota and the matrix API. I really don't recommend using QGIS for that, but you can try. |
Ah now I see. That was confusing. No, that's not how you install the ZIP package from Github! Pls read my README.md. You have to extract the ZIP and zip up the ORSTools subdirectory. |
Hi Nils, It must have something to do with the daily limits on the API, can we override that and is there a step by step tutorial to get me through this? Kind regards Gillian |
Did you activate the plugin in the Plugin Manager? It will definitely show up in the toolbar or in the Web (not the Plugin) menu, I just tried the exact same zip myself. What is a You Tube demo? Of course, you can our Python lib if QGIS doesn't work for you. I'm afraid I can't help you from here on. It's all there, you just need to make it work yourself. And it definitely has nothing to do with daily limits. |
Here's what I did
Here's what I got
Here's what I was expecting
Here's what I think could be improved
The text was updated successfully, but these errors were encountered: