I'm trying to run a code in which I need to use a dictionary, but the terminal acuses 'Invalid Syntax' when I try to define that dictionary. Outside of QGIS the code runs without any problems.

enter image description here

closed as off-topic by Vince, LaughU, Ian Turton Jun 11 at 8:23

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – LaughU, Ian Turton
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    " Outside of QGIS the code runs without any problems." are you sure ? – Hugo Roussaffa - GeoDatup Jun 6 at 23:51
  • 2
    Please do not paste pictures of code in questions. Instead, place the actual code, as text, so that our volunteers don't need to transcribe your code to show the syntax error in context. Always remember to look above where parse errors are reported, because it's rarely where the error occurred, just where the parser gave up in frustration. – Vince Jun 7 at 0:12

I think you are missing a closing square bracket and parenthesis on line 12

Not the answer you're looking for? Browse other questions tagged or ask your own question.