Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to flash my SD card on my Mac and receive an error message in the Terminal:

Command entered:

sudo python

  File "", line 177
SyntaxError: invalid syntax

I downloaded the necessary files from github/exaviorn/RasPiWrite.

Any ideas?

share|improve this question

closed as not constructive by Breakthrough, Brad Patton, 8088, Nifle, Ƭᴇcʜιᴇ007 Apr 28 '13 at 14:41

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

The else statement in line 177 is missing a colon.

Open in TextEdit, scroll down to line 177, add a colon after else, and save the edited file.

Alternatively, you can download my fixed version from Github.

I've submitted a pull request to the original author to fix the script.

share|improve this answer
Unfortunately it does not work, I receive another error: File "", line 275 SDsnip = SD.replace(' ', '')[:-1] ^ IndentationError: expected an indented block – Pete Apr 27 '13 at 14:18
pushed another commit that should fix this; does it work now? – nc4pk Apr 27 '13 at 20:05
No, it now works better but I receive the message: No, I now receive the message: Checking for updates... Traceback (most recent call last): File "", line 440, in <module> checkforUpdate() File "", line 68, in checkforUpdate dom = parseString(data) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/‌​", line 1924, in parseString File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/‌​", line 940, in parseString File – Pete Apr 28 '13 at 9:45
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/‌​", line 223, in parseString xml.parsers.expat.ExpatError: not well-formed (invalid token): line 15, column 59 --> What am I doing wrong? Thanks! – Pete Apr 28 '13 at 9:45

Not the answer you're looking for? Browse other questions tagged .