zadorlab / KinBot

Automated reaction pathway search for gas-phase molecules
Other
45 stars 15 forks source link

invalid syntax match atom_pattern: #73

Closed liqiang4567 closed 6 months ago

liqiang4567 commented 6 months ago

Hello, I installed the latest kinbot version, the following error appears, how to solve? Thank you!

Traceback (most recent call last): File "/home/XXX/software/anaconda3/envs/kinbot_code/bin/kinbot", line 5, in from kinbot.kb import main File "/home/XXX/Kinbot/kinbot_code/Kinbot_code/Kinbot/kinbot/kb.py", line 10, in from kinbot.reaction_finder import ReactionFinder File "/home/XXX/Kinbot/kinbot_code/Kinbot_code/Kinbot/kinbot/reaction_finder.py", line 29, in from kinbot.reactions.reac_R_Addition_MultipleBond import RAdditionMultipleBond File "/home/XXX/Kinbot/kinbot_code/Kinbot_code/Kinbot/kinbot/reactions/reac_R_Addition_MultipleBond.py", line 44 match atom_pattern: ^ SyntaxError: invalid syntax

juditzador commented 6 months ago

It is not a syntax error, this is a structure introduced in python 3.10 (match/case). I can revert this back to python 3.8 compatible code, I'll do it and let you know.

liqiang4567 commented 6 months ago

Thanks, can I upgrade python=3.10 to solve the problem?

juditzador commented 6 months ago

Yes, that's another solution. Let me know if that works.

liqiang4567 commented 6 months ago

Update to python=3.10 and the program can run normally

juditzador commented 6 months ago

Great!