Syntax Error in helper function

So i am using the VM and when i try to execute the batch processing script, python reports a syntax error like this:
Traceback (most recent call last):
File “batch_processing.py”, line 2, in
from helper_functions import *
File “/home/commonroad/repos/commonroad-search/notebooks/batch_processing/script/helper_functions.py”, line 12
def parse_vehicle_model(model: str):
^
SyntaxError: invalid syntax

(Edit: the ^ actually points at the colon between model and str)

I have pulled the latest version and didn’t touch the script at all. As nobody else seems to experience this, i doubt that the script is wrong. Does anybody know what could be the cause of this ?

Hi Alexdaner,

This is kind of strange. I just tested again and it works for me.
Maybe try downloading the image again? or you can remove the “:str” and try again.

Tank you for your help. However downloading the image again and removing the “:str” did not solve the problem. Well it at least changed the error message. It now said “ImportError: No module named pathlib”. I installed pathlib and now it also need yaml. However i can’t figure out how to install yaml. Even if i did, i assume a lot of other modules would be missing. There seems to be something incredibly wrong with my setup.

I just tried on another laptop, it worked well again. What system are you using? Are you using Virtual Box to open the image?

So i just tried it on my laptop and i have the same problem. It seems like the problem is located between chair and keyboard ;). I can’t figure out what im doing wrong tho. It should work out of the box right ? I tried it on ubuntu and windows 10 and yes, i am using virtual box to open the image. Is there anything else i have to pay attention to ?

Hi!

Try opening the notebook using jupyter notebook or python3 (instead of python 2).

Oh wow thank you very much. That seems to have been the problem. Now it is working. I don’t know why the default python version was 2.6

Glad to hear that your problems are solved.