You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran "xkcd-fetch -a" off a fresh dl of trsp. I pressed [return] after it output "Downloading comic 1059" (the latest one when I wrote this) and moved to a new line. I got this:
Traceback (most recent call last):
File "/home/lior/TRSP/bin/xkcd-fetch", line 273, in
comic_list.append(fetch(comics, int(line)))
ValueError: invalid literal for int() with base 10: ''
and RED_SPIDER_ROOT/work/xkcd-fetch/comic-data.txt was empty
it is also worth noting that the alt-text appears in the transcript of each comic and isnt filtered when put in the file, so that it appears at the end of the transcript data field and also in the title-text data field.
The text was updated successfully, but these errors were encountered:
The behaviour of xkcd-fetch -a that you describe is expected, strange as it may seem. Unless you specify the -n or -r option, xkcd-fetch expects that the user enters a comic number, either as an argument or on standard input. When you pressed return it expected a number and since the program is still a bit brittle with regard to unexpected circumstances, it crashed. What you wanted here was really xkcd-fetch -a -n or perhaps even xkcd-fetch -a -n -q. See xkcd-fetch -h for an overview of the options.
As for your other issue, that's probably not intended behaviour. I'm changing the issue title to emphasize this.
@nforrester Please have a look at this when you find the time?
Another note on the alt-text issue:
The alt text is always within double curly braces within the transcript string, afaict. Since Randall is inconsistent (or at least switched from one to the other at some point) about calling it the "title text" and "alt text" (and how he formats them) this looks like the best way of identifying it. However, some of the very early comics (like #10) don't have this addendum to the transcript, and others don't have a transcript (like 1060) so the program shouldn't take them for granted.
I just reviewed this issue by reading the feed cache, and I think it is actually fine as it is. The title_text field is always there, so there is no problem if you just want to know the title text. The transcript is not always there and doesn't always contain the title text in the same way, but that's an issue that only matters when you need a textual representation of the comic. The issue of completely lacking transcripts is not something we can fix, and by itself, it's fine for the title text to appear in the transcript. I think we should not worry about whether the transcript-embedded title text is called "Alt:" or "Title text:"; there is some value in staying faithful to the original JSON feed, too.
So I'm finally closing this issue. @cutecprog: if you want me to reopen it, just let me know.
I ran "xkcd-fetch -a" off a fresh dl of trsp. I pressed [return] after it output "Downloading comic 1059" (the latest one when I wrote this) and moved to a new line. I got this:
Traceback (most recent call last):
File "/home/lior/TRSP/bin/xkcd-fetch", line 273, in
comic_list.append(fetch(comics, int(line)))
ValueError: invalid literal for int() with base 10: ''
and RED_SPIDER_ROOT/work/xkcd-fetch/comic-data.txt was empty
it is also worth noting that the alt-text appears in the transcript of each comic and isnt filtered when put in the file, so that it appears at the end of the transcript data field and also in the title-text data field.
The text was updated successfully, but these errors were encountered: