-
Notifications
You must be signed in to change notification settings - Fork 4
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
NameError: name 'tr' is not defined #14
Comments
You probably have invalid or empty geometry in your input data. I fixed the Python error, but it will not fix the invalid geometry and realcentroid will stop. |
@zsiki got the same error using the plugin from plugins.qgis.org and fixing the invalid geometries solved it in my case. Happy to test your corrected code regarding the warning message from GitHub, but would need some guidance how to build/install the plugin from this repo. Running |
@pathmappers, you have to download the zip from github:
https://github.com/zsiki/realcentroid/archive/master.zip.
Unzip it into a new folder and copy the realcentroid.py to your local
plugin directory overwriting the installed version from plugins.qgis.org
On linux your plugin directory is here:
./.local/share/QGIS/QGIS3/profiles/default/python/plugins/realcentroid/
pathmapper <[email protected]> ezt írta (időpont: 2019. szept. 25.,
Sze, 5:25):
… @zsiki <https://github.com/zsiki> got the same error using the plugin
from plugins.qgis.org and fixing the invalid geometries solved it in my
case.
Happy to test your corrected code regarding the warning message from
GitHub, but would need some guidance how to build/install the plugin from
this repo. Running make results in an error (nothing to do for 'default').
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#14?email_source=notifications&email_token=AAHZ64HYZZPEZH7M7DMUOULQLLK3XA5CNFSM4IT7N5L2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7QO33Q#issuecomment-534834670>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHZ64HEZNGX5A3INCVE2GTQLLK3XANCNFSM4IT7N5LQ>
.
--
Üdv.
Siki Zoltán
|
@zsiki thanks, works great. Now there is an alert (screenshot below) and the centroids are generated for all valid polygons. |
Great I'll prepare a new version and upload to the official QGIS plugin repository. |
NameError: name 'tr' is not defined
Traceback (most recent call last):
File "C:/Users/d.korottsev/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\realcentroid\realcentroid.py", line 231, in run
self.generate()
File "C:/Users/d.korottsev/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\realcentroid\realcentroid.py", line 210, in generate
tr("Invalid or empty geometries found, see log messages"))
NameError: name 'tr' is not defined
Версия Python: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
Версия: 3.4.11-Madeira Madeira, 9a8a6d4687
The text was updated successfully, but these errors were encountered: