[GH-ISSUE #56] Ubuntu 17.10: chromium version is not parsed correctly #1549

Closed
opened 2026-03-01 17:51:38 +03:00 by kerem · 2 comments
Owner

Originally created by @nasenpflaster on GitHub (Nov 28, 2017).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/56

Originally assigned to: @pirate on GitHub.

I get the following error when running archive.py:

[*] Checking Dependencies:
/usr/bin/chromium-browser
Traceback (most recent call last):
  File "./archive.py", line 124, in <module>
    update_archive(archive_path, links, source=source, resume=resume, append=True)
  File "./archive.py", line 70, in update_archive
    archive_links(archive_path, links, source=source, resume=resume)
  File "/home/benjamin/bin/bookmark-archiver/archive_methods.py", line 40, in archive_links
    check_dependencies()
  File "/home/benjamin/bin/bookmark-archiver/util.py", line 63, in check_dependencies
    if int(version) < 59:
ValueError: invalid literal for int() with base 10: 'Using'

the reason is that

chromium --version

might give something like

Using PPAPI flash.
--ppapi-flash-path=/usr/lib/adobe-flashplugin/libpepflashplayer.so --ppapi-flash-version=
Chromium 62.0.3202.94 Built on Ubuntu , running on Ubuntu 17.10

on Ubuntu 17.10. I changed line 62 of util.py

version = result.stdout.decode('utf-8').replace('Google Chrome ', '').replace('Chromium ', '').split(' ', 1)[0].split('.', 1)[0] # TODO: regex might be better
63

to

version = result.stdout.decode('utf-8').split('Chromium',1)[1].replace('Google Chrome ', '').replace('Chromium ', '').split(' ', 1)[1].split('.', 1)[0]

but could not find an immediate solution to also cover Google Chrome

Originally created by @nasenpflaster on GitHub (Nov 28, 2017). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/56 Originally assigned to: @pirate on GitHub. I get the following error when running archive.py: ``` [*] Checking Dependencies: /usr/bin/chromium-browser Traceback (most recent call last): File "./archive.py", line 124, in <module> update_archive(archive_path, links, source=source, resume=resume, append=True) File "./archive.py", line 70, in update_archive archive_links(archive_path, links, source=source, resume=resume) File "/home/benjamin/bin/bookmark-archiver/archive_methods.py", line 40, in archive_links check_dependencies() File "/home/benjamin/bin/bookmark-archiver/util.py", line 63, in check_dependencies if int(version) < 59: ValueError: invalid literal for int() with base 10: 'Using' ``` the reason is that > chromium --version might give something like > Using PPAPI flash. > --ppapi-flash-path=/usr/lib/adobe-flashplugin/libpepflashplayer.so --ppapi-flash-version= > Chromium 62.0.3202.94 Built on Ubuntu , running on Ubuntu 17.10 on Ubuntu 17.10. I changed line 62 of util.py > version = result.stdout.decode('utf-8').replace('Google Chrome ', '').replace('Chromium ', '').split(' ', 1)[0].split('.', 1)[0] # TODO: regex might be better 63 to > version = result.stdout.decode('utf-8').split('Chromium',1)[1].replace('Google Chrome ', '').replace('Chromium ', '').split(' ', 1)[1].split('.', 1)[0] but could not find an immediate solution to also cover Google Chrome
kerem closed this issue 2026-03-01 17:51:38 +03:00
Author
Owner

@pirate commented on GitHub (Nov 28, 2017):

Ah, I knew trying to parse a version string was going to be trouble eventually :)

Fixed in 6eb1e23, try pulling master and running it again.

<!-- gh-comment-id:347386126 --> @pirate commented on GitHub (Nov 28, 2017): Ah, I knew trying to parse a version string was going to be trouble eventually :) Fixed in 6eb1e23, try pulling master and running it again.
Author
Owner

@pirate commented on GitHub (Nov 28, 2017):

Comment back if you're still experiencing problems and I'll reopen the issue.

<!-- gh-comment-id:347578031 --> @pirate commented on GitHub (Nov 28, 2017): Comment back if you're still experiencing problems and I'll reopen the issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#1549
No description provided.