After run, then 1064 error “have an error in your SQL syntax”

I use win8 64bit+anaconda(python 2.7),the nupic installation is ok,mysql installation is ok.

Running the /examples/swarm/ executes correctly. However, when I try to run examples/opf/clients/hotgym/prediction/one_gym/ I get the error listed below.

ProgrammingError: (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘:\Users\USER’ at line 1")

I do not know what wrong with it. Any thoughts or help would be much appreciated!

What version of MySQL are you running?

I have tried both versions 5.6.45 and 5.7.23.

Try setting the $USER environment variable to your username.

Thanks for your reply. I have set the USER environment variable to my username. The following figure shows the configuration of my environment variables.

I have no idea about this issue. Any reply is grateful.

Hi @404nala,

Looks like you’ve set the USER environment variable to your user’s profile directory. (C:\Users\USER). It needs to just be your username (USER)


You should replace \\ in all nupic.cluster.database.nameSuffix with _ as \\ break SQL. In other words, insert suffix = suffix.replace("\\", "_") in def __getDBNameForVersion(cls, dbVersion) in \nupic\database\

1 Like

I’m glad to get your answer. It’s very useful to me and my program is working. Thank you.