Fundamentals - Looking For Errors
October - 2021
When you see an error message, look for the line before it to see if something wasn't closed
18 def add_channel(self, *, channelPrimaryKey, channelIdString):
19 print(f"- INSERT/IGNORE Channel: {channelIdString}"
20
21 def update_song_data(self):
Error:
File "/Users/alans/workshop/msync-admin-scripts/playlist_loaders/07_update_channels/update_channels
.py", line 21
def update_song_data(self):
^
SyntaxError: invalid syntax
shell returned 1
Error is actually on line 19 where I didn't close the final paren. This:
print(f"- INSERT/IGNORE Channel: {channelIdString}"
Should have been:
print(f"- INSERT/IGNORE Channel: {channelIdString}")