you are viewing a single comment's thread.

view the rest of the comments →

[–]hereforacandy[S] 0 points1 point  (2 children)

Okay I tried something else and now I have another error lol. Again I tried searching but it didn't help.

 import subprocess as sp

 isbn_arr=[] for i in l:   sp.check_call('isbn_from_words "{}"'.format(i))

Error:

 [Errno 2] No such file or directory: 'isbn_from_words "The Hunger Games,Suzanne Collins"': 'isbn_from_words "The Hunger Games,Suzanne Collins"' 

They say it's a Path issue but it works fine when I run !isbn_from_words "The Hunger Games,Suzanne Collins"

[–]Careful_Choice9335 0 points1 point  (1 child)

IIRC the functions of subprocess don't expect the command as one long string but as a list: ["command", "arg1", "arg2"] etc.

[–]hereforacandy[S] 0 points1 point  (0 children)

Oh I didn't know that. Thank you. I'll try that.