AntonelloDN / ShrimpGIS

A basic plugin for Grasshopper to read and write shapefile and geojson (GPL)
GNU General Public License v3.0
17 stars 3 forks source link

1. Solution exception:unexpected token 'from' #11

Closed gerardbertomeu closed 1 year ago

gerardbertomeu commented 2 years ago

After installing ShrimpGis, all the components display the following error message:

  1. Solution exception:unexpected token 'from'

Any tips? Thanks!

gerardbertomeu commented 2 years ago

Please find here a screen capture illustrating the issue:

Screenshot 2022-09-14 103220

grazianoEnzoMarchesani commented 2 years ago

I don't know if there is a correlation, but I have the same problem on one PC where ladybug 1.5 is installed, while on another where ladybug 1.4 is installed, everything works fine

gerardbertomeu commented 2 years ago

Thank you!

I completely uninstall ladybug tools (1.5) and it's back!

ncatunda commented 1 year ago

Yep, same here with LBT 1.5. After uninstalling everything works fine :)

PS: It also does not work with LBT version 1.6.

grazianoEnzoMarchesani commented 1 year ago

Yep, same here with LBT 1.5. After uninstalling everything works fine :)

PS: It also does not work with LBT version 1.6.

No offence to Antonello, who I know and respect so much for his work, but I suggest you try another open source plugin called BearGis

https://github.com/nicoazel/BearGIS

JamesParrott commented 1 year ago

Graziano, this issue was not (entirely) Antonello's fault. ShrimpGIS's dependencies should be structured far better than copying in utm verbatim, including its "use which ever numpy it finds" optional dependency.

But if you install Lady Bug Tools, and then in a GhPython component simply do import numpy, on my machine (Rhino 7) exactly this "unexpected token 'from' " error is reproduced, without shrimpGIS installed, without any other plug-in installed.

image

grazianoEnzoMarchesani commented 1 year ago

Graziano, this issue was not (entirely) Antonello's fault. ShrimpGIS's dependencies should be structured far better than copying in utm verbatim, including its "use which ever numpy it finds" optional dependency.

But if you install Lady Bug Tools, and then in a GhPython component simply do import numpy, on my machine (Rhino 7) exactly this "unexpected token 'from' " error is reproduced, without shrimpGIS installed, without any other plug-in installed.

image

I understand what you mean. Unfortunately I am not able to give an answer. I hope Antonello can rethink the dependency system in the future because shrimpGis is a plugin I have used a lot and I appreciate Antonello's work very much. Rightly so, he has a lot of other work and the maintenance of this plugin takes a back seat. I also hope that someone will be able to fork the project and maintain it.

JamesParrott commented 1 year ago

I also hope that someone will be able to fork the project and maintain it.

I couldn't agree more! I think I have fixed this particular dependency conflict with this PR from my own fork a few hours ago: https://github.com/AntonelloDN/ShrimpGIS/pull/13 (although the potential dependency conflict is still there for any other plug-in to fall into with LadyBug Tools).

But I only deleted a few lines and de-indented a few others (the trick of course, is knowing which lines to delete ;-) ). And I don't know the shrimpGIS code base well enough and can't commit to maintaining a fork.

grazianoEnzoMarchesani commented 1 year ago

I also hope that someone will be able to fork the project and maintain it.

I couldn't agree more! I think I have fixed this particular dependency conflict with this PR from my own fork a few hours ago: #13 (although the potential dependency conflict is still there for any other plug-in to fall into with LadyBug Tools).

But I only deleted a few lines and de-indented a few others (the trick of course, is knowing which lines to delete ;-) ). And I don't know the shrimpGIS code base well enough and can't commit to maintaining a fork.

I wouldn't be able to either, but thank you very much on behalf of the whole community

ncatunda commented 1 year ago

Yep, same here with LBT 1.5. After uninstalling everything works fine :) PS: It also does not work with LBT version 1.6.

No offence to Antonello, who I know and respect so much for his work, but I suggest you try another open source plugin called BearGis

https://github.com/nicoazel/BearGIS

@grazianoEnzoMarchesani, does BearGIS export z-values? ShrimpGIS is definively a bit more annoying for me to use because I have to deal with different coordinate system, since it only works with WGS84. I always have to transform things back and forth. In that sense BearGIS would be so much more efficient, but not exporting the z-values is a killer criteria to me.

JamesParrott commented 1 year ago

I could only find code for treating points as 2D in BearGIS (and couldn't actually get it to export to any shape file at all, without providing attrs, field values and prj).

AntonelloDN commented 1 year ago

Solved by #13