Ask coding questions

← Back to all posts
Invalid Syntax on Method
EliaGjika (0)

Hi there! I can't seem to pin down the bug in line 42 of the Phonebook.py file.
The error says "Invalid Syntax" but I seem to have all the correct punctuation down.
Any ideas?

https://replit.com/@EliaGjika/Final-Project-Code-for-Albania#Phonebook.py

Comments
hotnewtop
FishballNooodle (211)

Works perfectly find for me.
IF there are any errors you can invite me to the repl and I can help you

EliaGjika (0)

@FishballNooodle Thank you so much for your help! Managed to find the bug. It was in the printing and formatting of a specific sentence. I think it works now!

InvisibleOne (3228)

Line 38 and 39 should be in one line I think, but it didn't give me any errors.

EliaGjika (0)

@InvisibleOne Thanks so much! Yep, it was that one. Took me a while to notice with some help XD

InvisibleOne (3228)

It's always those little things that are hard to spot. One time it took me almost an hour of trying to fix my project just to realize that I had missed a paranthesis, now that's one of the first things I check when I get a bug. @EliaGjika