0

when I try to run the code:

bg_surface = pygame.image.load("C:\Users\Super\Documents\flappy bird\assets\flappy-bird-assets-master\sprites\background-day.png")

I get this error:

SyntaxError: (unicode error) 'unicodeescape' codec
can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

how do I fix it?

Sasha
  • 633
  • 1
  • 6
  • 14
  • 1
    Backslash (``\``) is the escape character. Use forward slashes (`/`) to separate directories or double backslashes (``\\``). – Selcuk Nov 17 '21 at 02:51

0 Answers0