User Controls

Spooky Syntax Errors that shouldn´t exist.

  1. #1
    Sophie Pedophile Tech Support
    I am getting a syntax error in the code below. While i know for a fact the syntax is perfectly fine.


    import pickle
    import os.path
    from blessings import Terminal

    t = Terminal()

    if not os.path.isfile("HDB-api-ID.p"):

    print "[" + t.green("+") + "]Please provide your HoneyDB API ID\n"
    DB_API_ID = raw_input("API ID: ")

    pickle.dump(DB_API_ID, open( "HDB-api-ID.p", "wb" )

    print "[" + t.green("+") + "]Please provide your HoneyDB API key\n"
    DB_API_KEY = raw_input("API key: ")

    pickle.dump(DB_API_ID, open( "HDB-api-key.p", "wb" )

    print "[" + t.green("+") + "]Your API data has been saved to 'HDB-api-ID.p' and 'HDB-api-key.p' in the current directory.\n"

    else:

    try:
    DB_API_ID = pickle.load(open( "HDB-api-ID.p", "rb" ))
    DB_API_KEY = pickle.load(open( "HDB-api-key.p", "rb" ))
    except IOError as e:
    print "[" + t.red("!") + "]Critical. An IO error was raised while attempting to read API data.\n"
    print e

    sys.exit(1)

    ID_path = os.path.abspath("HDB-api-ID.p")
    KEY_path = os.path.abspath("HDB-api-key")

    print "[" + t.green("+") + "]Your API ID was succesfully loaded from" + ID_path

    print "[" + t.green("+") + "]Your API key was succesfully loaded from" + KEY_path


    I don't get it. Here's my error message.


    File "mimir.py", line 27
    print "[" + t.green("+") + "]Please provide your HoneyDB API key\n"
    ^
    SyntaxError: invalid syntax


    Post last edited by Sophie at 2017-04-28T11:51:17.040278+00:00
  2. #2
    -SpectraL coward [the spuriously bluish-lilac bushman]
    You've probably got some whitespace in there somewhere.
  3. #3
    Sophie Pedophile Tech Support
    Originally posted by -SpectraL You've probably got some whitespace in there somewhere.

    Yeah sometimes when you indent you get spaces instead of tabs, i personally prefer tabs. But that was basically the first thing i checked. Unfortunately it still gives me a syntax error where it's not supposed to. Even after checking my indentation.
  4. #4
    -SpectraL coward [the spuriously bluish-lilac bushman]
    Might be an uppercase/lowercase error.
  5. #5
    Originally posted by -SpectraL Might be an uppercase/lowercase error.

    Might be... Why don't you program an init string into a modem and let us know what answer you up with.
  6. #6
    SBTlauien African Astronaut
    I'm only on my phone, but as a random guess, are you not escaping something? Is that bracket in need of an escaping?
  7. #7
    Sophie Pedophile Tech Support
    Originally posted by SBTlauien I'm only on my phone, but as a random guess, are you not escaping something? Is that bracket in need of an escaping?

    Not an issue of escaping anything either.
  8. #8
    Sophie Pedophile Tech Support
    Oh i figured it out i forgot to close with parenthesis right here.


    pickle.dump(DB_API_ID, open( "HDB-api-ID.p", "wb" )


    Was too focused on where my error message was pointing me. Lol. Thanks anyway guys.
  9. #9
    -SpectraL coward [the spuriously bluish-lilac bushman]
    User error.
  10. #10
    Originally posted by -SpectraL User error.

    That is not a user error it was a syntax error you fuckered dumb know nothing ignorant dimwitted try hard wanna be never was twat waffling turd sucker.
  11. #11
    -SpectraL coward [the spuriously bluish-lilac bushman]
    A syntax error IS a user error.
    The following users say it would be alright if the author of this post didn't die in a fire!
  12. #12
    Originally posted by -SpectraL A syntax error IS a user error.

    No it isn't you know nothing fuck. It is a programming error made by the person writing the program not the person using the program.


    syn·tax er·ror
    noun
    COMPUTING
    a character or string incorrectly placed in a command or instruction that causes a failure in execution.


    A user error is any error that has been caused by the user of the computer and not the computer, hardware, or software running on the computer.


    If you admit you learned something from this you will learn something from this.
  13. #13
    I just have to add this. SpectraL I am not, never have been, never will be, and never wanted to be a programmer. But I have forgotten more about programming than you will ever know. To me you are an amusing joke to slap about whenever the punch line appears. To guys like Sophie and Lanny who actually take the time to teach themselves languages you must seem pathetic.
  14. #14
    -SpectraL coward [the spuriously bluish-lilac bushman]
    Originally posted by Darth Beaver …It is a programming error made by the person writing the program
  15. #15
    Originally posted by -SpectraL

    Exactly, a syntax error is made by the person writing the program. A user error is made by the person using the program. People would believe you on those rare occasions when you present accurate information if you would just admit when you are wrong.
  16. #16
    SBTlauien African Astronaut
    lol, I think SpectraL was referring to it as the user making the program error.
  17. #17
    Originally posted by SBTlauien lol, I think SpectraL was referring to it as the user making the program error.

    SpectraL is just trying to sidestep like he does every time some points out, with proof, how little he really knows.
  18. #18
    Sophie Pedophile Tech Support
    Never you mind about this syntax error. I have an outdated SSL lib and i need a monkey patch unless i want to translate my program to Python 3.

    https://niggasin.space/thread/10835
  19. #19
    -SpectraL coward [the spuriously bluish-lilac bushman]
    When you program, you are using a programming language to do it. People use languages. Users are people. Therefore, it is a user error when that user creates a syntax error while programming. Not hard to figure out.
  20. #20
    Originally posted by -SpectraL When you program, you are using a programming language to do it. People use languages. Users are people. Therefore, it is a user error when that user creates a syntax error while programming. Not hard to figure out.

    This is why you can't keep up with the times Billy. You refused to admit when someone teaches you something you didn't know. I feel kind of sorry for you.
Jump to Top