|
Hi all, |
|
Sorry @leo -- close but not quite right. Here is the same reason when code is pasted in the code editor window for 4.8,4.9 and 4.12 - if the 'hidden last line' in the window is somehow deleted- then the submission fails or there are spurious error messages when in fact the function submitted could be correct Solution: everything works now. For questions > 4.8 Reset them, and then paste in only the relevant functions. Thanks. After spending way too long trying to get it to work, the copy and reset trick worked. Yeah! that trick worked fine. Thanks What if you also define some other functions? That is the solution I found as well. However, it seems to have nothing to do with a "hidden last line". It's just some bug in the web site they need to track down and fix. I've added this thread about it: I would guess it is more likely a problem with file formatting like CR LF vs LF at the end of lines or with the last line in the file not having a trailing LF that is causing problems. It's totally separate from the bug in some browsers not showing the last line of the code window (as far as I can tell). |
|
After many hours and much frustration I read this post link and found the trick: reset the code window, then be careful to only paste the search() code. It worked for me. Hopefully it will work for you too. I can't verify the presence of the 'hidden last line' but the above steps did the trick for me. Also my code returns to results and I use a print search() command. |
|
I took out and still the same problem. Does my code have to call the search () function at the end or not? Also , i inserted some functions before search() |
|
Hi, |
|
I get the same problem. Mine works python browser & development python BUT not on submit. My code is not the same as the coded "proof" but it works. This type of thing is frustrating. |
|
I had the same problem, the code did seem to work but I still could not submit it. I have found the solution. Just a little hint: read well the instructions that are written at the beginning of the exercise. You should find something you have not done. Good luck! |
And I tried Sebastian's code from the answer. It also failed with the same error.
Following some peoples' comments, I modified Sebastian's code to return either the solution or the word fail. It worked when I hit run but still gave the error.