Error while compiling as runnable JAR

Asked by xyz_User on 2019-09-12

hello RaiMan - Was hoping you can point me in the right direction. My script runs flawless with out issue it's only when i'm trying to compile it as a runnable JAR file i get the following error:

Compiling C:/Users/test/AppData/Roaming/Sikulix/SetupStuff/scriptCompiled\__run__.py ...
SyntaxError: ("mismatched input '-' expecting NEWLINE", ('C:\\Users\\test\\AppData\\Roaming\\Sikulix\\SetupStuff\\scriptCompiled\\__run__.py', 4, 10, 'import WoW-Based-Skill-v9.5\n'))

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
xyz_User
Solved:
2019-09-12
Last query:
2019-09-12
Last reply:
2019-09-12
RaiMan (raimund-hocke) said : #1

the hyphen - and the dot . are not allowed in Python names, which is used inside the jar to import your script.

so name your script file either:
WoW_Based_Skill_v9_5

or use CamelCase:
WowBasedSkillV95

xyz_User (userseven) said : #2

Thanks so much! This resolved my question! Almost 4000 lines of code I was nearly heart broken :D