nextgis / qgis_reconstructline

QGIS plugin for making line out of points interactively
GNU General Public License v2.0
0 stars 3 forks source link

AttributeError: module 'numpy' has no attribute 'complex' #18

Open taro8 opened 4 months ago

taro8 commented 4 months ago

I'm getting an AttributeError: module 'numpy' has no attribute 'complex' error when I try to insert line from selected objects. Is it possible that the python in QGIS 3.32.3 does not have it any more? I read that complex in numpy was deprecated in favour of inbuilt complex.

Using QGIS 3.32.3

taro8 commented 4 months ago

Figured out the solution. Turns out the plugin is trying to use commands that were removed from python: np.complex and np.int. You can edit the connector.py and tuner.py and replace them with complex and int. This solves the issues and makes the plugin work again.

Gui0delp commented 4 months ago

Hi yes the solution is to change the np.complex and np.int. For that you can follow the Numpy Documentation. I test the plugin with QGis 3.30.3-'s-Hertogenbosch (2411cec112) and i don't have the problem, may be it come after that version of QGIS ( > 3.30.3)

Gui0delp commented 4 months ago

I propose that pull request for resolve the bug mentioned by @taro8, feel free to propose another solution if you want :)