0

I have python 2.7 installed on my windows computer. I'm trying to email a puzzle answer to Spotify, which is running Python 2.6.6. When I submit my *.py source code, I'm getting the following error:

Run Time Error

Exited, exit status: 1

I only have "import sys". I've run tons of stress tests - possible inputs are 1 ≤ m ≤ 10 000 lines, I've tested with 1 million+ values with zero problems. I've tried printing with print & sys.stdout.write.

When I send in dummie test code (I run my full algorithm but only print garbage instead of my answer - ie, print "test!"), I get the expected "Wrong Answer" back.

I have no idea where to start debugging - any tips/help at all?

Thanks! -Sam

Sam
  • 1
  • 1
  • Is there import sys in dummy code? – user517893 Sep 22 '11 at 09:03
  • Hard to say without looking at your code. Why are you using `sys.stdout.write` instead of simply using `print`? – MAK Sep 22 '11 at 09:10
  • Yeh, dummy code does this: read in data with std in, run the algorithm, print out what was previously read in. – Sam Sep 22 '11 at 15:27
  • I'd like to avoid posting any code, but I realize that makes it much harder to help. Any tips on what kinds of things would throw that error would be greatly appreciated... – Sam Sep 22 '11 at 15:29

1 Answers1

1

I got the same error. As I see it's not python output but just an answer from spotify bot that your program threw an exception in some tests. Maybe the real output isn't shown to prevent debugging using the bot.

When you print dummy data fist test fails and you get 'Wrong Answer'.

When you print real output first test may pass but next throw an exception and you get 'Run Time Error'.

I fixed one defect with possible exception in my script and Run Time Error went away.

grdshch
  • 341
  • 2
  • 4