Skip to content
Advertisement

Python Pillow having error with dictionaries nested in list

I am creating a list of nested dictionaries to have the file addresses for images I will be using for my program. However, in the BU0 dictionary it seems to cause an error that reads:

JavaScript

Here is the nested list:

JavaScript

Advertisement

Answer

Try to escape the backslashes:

JavaScript

Or put them as raw strings r"...":

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement