-
Notifications
You must be signed in to change notification settings - Fork 112
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
Python 3 #5
Comments
Found this fork randomly but this Notebook is pretty good at explaining how to use the Treepedia library (also code in this repo is good for Python 3 too). edit: updated URL |
Hi, thanks for reporting this issue!
Is the file you are using in WGS84? If so, can you share the file with me
so I can check to see if I can reproduce this?
Also, will be helpful to know your Python version (3.7, 3.8, or others).
"This is the best of all possible worlds." *— **Gottfried Wilhelm Leibniz*
…On Mon, 16 Aug 2021 at 20:39, ubi007 ***@***.***> wrote:
Thank you for converting the code to Python3.
However I'm getting the following error, any leads on how to get around it?
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE175708>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE1F5088>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE175708>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE10F488>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE175708>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE10F488>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE175708>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE10F488>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE10F488>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE175708>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE10F488>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE175708>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE10F488>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE175708>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE10F488>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE175708>)
You should make sure the input shapefile is WGS84
(<class 'ValueError'>, ValueError('cannot convert float NaN to integer',),
<traceback object at 0x0000019EFE10F488>)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADTPUSDKHD5E4QNYSXSRSZTT5D2ILANCNFSM4M34F3SQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Thank you for a prompt reply. |
Yeah the code that skips MultiLineString was from the original code I
believe. Otherwise it gives an error.
The portion of MultiLineString in the shape files I've run the code on is
really small, and hence that didn't have any impact on the output.
"This is the best of all possible worlds." *— **Gottfried Wilhelm Leibniz*
…On Mon, 16 Aug 2021 at 23:07, ubi007 ***@***.***> wrote:
Thank you for a prompt reply.
I've noticed that my shapefile was not in WGS84. I am converting it right
now and I'll try it again once it's ready.
I'm using Python 3.6.8
One thing I've noticed is that in createPoint.py, MultiLineString is not
processed and I'm not sure how this would impact the final result.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADTPUSDE4Y4ZBZWHOKLVUXLT5ELRHANCNFSM4M34F3SQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Hi, I have the following error: Is this link in the code style ok ? Thanks for your help |
@minmax10 |
@Polothree which version of Python are you using? |
Hi @y26805 , I am using python 3.10.6 version. I am testing the Cambridge shapefile example. It seems that on the code version you release here: https://github.com/xiaojianggis/Treepedia_Public/tree/master/Treepedia This part of the code has changed: I need a API key. Is that the problem ? Thanks for your help ! Here is the code I am using:
|
hi @Polothree, yup I believe the endpoint this project was previously using may have been deprecated. I have a section in my fork's README that may help you: |
Since this repo was written in the era of Python 2.7, I have adapted the code to Python 3 in my forked version of the repo.
Also added instructions for how to get Street View API key.
https://github.com/y26805/Treepedia_Public
Hope this helps someone.
The text was updated successfully, but these errors were encountered: