Teakinboyewa / SpatialAnalysisAgent

GNU General Public License v3.0
44 stars 9 forks source link

fstrings error #14

Closed NyakudyaA closed 3 days ago

NyakudyaA commented 1 month ago

Running the plugin I ge t the error

SyntaxError: f-string expression part cannot include a backslash
The script finished with errors.User: create a new layer from the layer that stores the WKT for the lat long of each polygon
Error: f-string expression part cannot include a backslash (SpatialAnalysisAgent_ToolsDocumentation.py, line 107)
Traceback (most recent call last):
  File "/Users/mazano/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SpatialAnalysisAgent-master/SpatialAnalysisAgent_dockwidget.py", line 1161, in run
    exec(script_content, exec_globals, exec_locals)
  File "<string>", line 40, in <module>
  File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/qgis/utils.py", line 923, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/mazano/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SpatialAnalysisAgent-master/SpatialAnalysisAgent/SpatialAnalysisAgent_ToolsDocumentation.py", line 107
    fixed_lines.append(f'{add_line_breaks_to_parameters("\n".join(section_content))}\n"""')
                                                                                          ^
SyntaxError: f-string expression part cannot include a backslash
The script finished with errors.
Teakinboyewa commented 1 month ago

@NyakudyaA Thank you for pointing this out! I have revised the code and updated the GitHub repository. Please download the updated version from GitHub and let me know if this error persists or if you get any other error. Thank you!

anitagraser commented 5 days ago

I can confirm that getting the dev version fixed this issue for me.