6

When an obviously correct line gives a syntax error, look to the preceding line. Are there enough ')' on the db.execute?


2

Not all of them! $alphacount = 0 :)


1

You have to provide commas to keep separate your logical expressions like And(Or(AKnight, AKnave), Biconditional(AKnight, Not(AKnave)), Biconditional(AKnave, Not(AKnight)), Implication(AKnight, And(AKinght, AKnave)), Implication(AKnave, Not(And(AKnight, AKnave))) ) This is the mistake in your logic.


1

This datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') is not valid sqlite syntax. You can simply use datetime('now'). It will return the current datetime in YYYY-MM-DD HH:MM:SS format. Try SELECT datetime('now') in command-line sqlite3 or phpliteadmin to see the result (no FROM is required). The problem with the Debugging snippet is at the end 'sell', ...


1

The code posted above compiled without error for me. Is it possible that you didn't cut and paste the original code from your development environment exactly as it appears? Errors like this usually come from a typo or something else that doesn't belong somewhere, such as a stray semicolon. [edit-gotta stop answering half asleep. ;-) ] Now that I've ...


1

It is as easy as replacing else with elif, in python a condition is not allowed after an else, remember that else is executed if the if condition is not fulfilled, if we want to impose a new condition we must use elif: if condition: ....code elif condition1: ....code else: ....code


1

It's exactly what it says, a straight up missing closing curly brace. Try counting them for yourself. Starting with the beginning of the bitnumber() function at line 96, start counting +1 for each { and -1 for each }. When you get to the end, the final count should be 0, but it's 1. That means you're missing a closing curly brace - either the last one for ...


Only top voted, non community-wiki answers of a minimum length are eligible