kartoza / stream_feature_extractor

A QGIS plugin to extract stream features (wells, sinks, confluences etc.) from a stream network
GNU General Public License v2.0
6 stars 9 forks source link

Port to QGIS3 #55

Closed NyakudyaA closed 2 years ago

NyakudyaA commented 5 years ago

I am not sure how to test the running of the plugin. @myarjunar Can you take a look when you get a chance

jfbourdon commented 3 years ago

I wanted to take a look at this plugin and tried your port (QGIS 3.14 on Windows 10) but I got the following error on install:

File "C:\Users\myself\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\stream_feature_extractor-qgis3\third_party\simplejson\__init__.py", line 114, in 
    from .encoder import JSONEncoder, JSONEncoderForHTML
File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 743, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users\myself\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\stream_feature_extractor-qgis3\third_party\simplejson\encoder.py", line 39, in 
    ESCAPE_DCT.setdefault(chr(i), '\\u%04x' % (i,))
File "C:\Users\myself\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\stream_feature_extractor-qgis3\third_party\simplejson\compat.py", line 42, in chr
    return u(chr(s))
File "C:\Users\myself\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\stream_feature_extractor-qgis3\third_party\simplejson\compat.py", line 42, in chr
    return u(chr(s))
File "C:\Users\myself\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\stream_feature_extractor-qgis3\third_party\simplejson\compat.py", line 42, in chr
    return u(chr(s))
  [Previous line repeated 913 more times]
RecursionError: maximum recursion depth exceeded
NyakudyaA commented 3 years ago

I wanted to take a look at this plugin and tried your port (QGIS 3.14 on Windows 10) but I got the following error on install:

File "C:\Users\myself\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\stream_feature_extractor-qgis3\third_party\simplejson\__init__.py", line 114, in 
    from .encoder import JSONEncoder, JSONEncoderForHTML
File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 743, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users\myself\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\stream_feature_extractor-qgis3\third_party\simplejson\encoder.py", line 39, in 
    ESCAPE_DCT.setdefault(chr(i), '\\u%04x' % (i,))
File "C:\Users\myself\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\stream_feature_extractor-qgis3\third_party\simplejson\compat.py", line 42, in chr
    return u(chr(s))
File "C:\Users\myself\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\stream_feature_extractor-qgis3\third_party\simplejson\compat.py", line 42, in chr
    return u(chr(s))
File "C:\Users\myself\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\stream_feature_extractor-qgis3\third_party\simplejson\compat.py", line 42, in chr
    return u(chr(s))
  [Previous line repeated 913 more times]
RecursionError: maximum recursion depth exceeded

The QGIS API might have changed a lot since I ported this to be ready for 3.0. I will take a look over the weekend and revert