Good time!!! I recently downloaded a file from github from here ... called a calendar, which is generated using a 2xx python, the point is that the author claims that it was from him that he generated and everything was valid ... but

some dances with tambourines (numpy & svgfig) and as a result:

/usr/bin/python2.7 /home/user/calendar/src/calendar.py Traceback (most recent call last): File "/home/user/calendar/src/calendar.py", line 386, in outputFile, timeModelType, language = sys.argv [0:] ValueError: need more than 1 value to unpack

Process finished with exit code 1

I tried to lay out the code itself, but it is not readable here ...

crs + .svg ...

  • In the file by reference, line 386 looks like this: outputFile, timeModelType, language = sys.argv[1:] (and not because you have an error in the text). The essence of the error is that fewer parameters are passed to the script than it expects. - insolor
  • one
    The script in this case should be called as python имя_скрипта.py имя_выходного_файла время_модель_тип язык . (whatever that means) - insolor

1 answer 1

Line 386 in the source file looks like this:

 outputFile, timeModelType, language = sys.argv[1:] 

The essence of the error is that at least one of the parameters is not transferred to the script: the name of the output file, the model of the time type (or the type of time model, whatever that means), and the language. You need to call the script like this:

 python calendar.py 1_параметр 2_параметр 3_параметр 
  • so how to extract a .pdf file from it? - Vovka Ra
  • @VovkaRa, open svg in Inkscape and save to pdf. In the script, as far as I can see, there is no saving functionality in pdf. - insolor
  • Is the team supposed to look like this? - python calendar.py test, top, ru ... but after that I start to swear to the language - Vovka Ra
  • @VovkaRa no commas needed - insolor
  • @VovkaRa, learn to read error messages: there you can clearly see that it swears at the wrong language ', ru'. A comma is not needed to separate parameters in the command line, a space is needed. - insolor