Calamares crashes in calamares/modules/automirror/main.py in run() country = getcountry() with urlopen error [Errno 0] Error

Bug #1794844 reported by Jean-Baptiste Lallement
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calamares-settings-ubuntu (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

lubuntu cosmic i386 20180927

Default installation in French from the live session, the installer crashes with:

 2018-09-27 - 18:42:22 [6]: Python Error:
 <class 'urllib.error.URLError'>
 <urlopen error [Errno 0] Error>
 File "/usr/lib/i386-linux-gnu/calamares/modules/automirror/main.py", line 124, in run
    country = getcountry()

  File "/usr/lib/i386-linux-gnu/calamares/modules/automirror/main.py", line 85, in getcountry
    with request.urlopen("https://ipapi.co/json") as url:

  File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)

  File "/usr/lib/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)

  File "/usr/lib/python3.6/urllib/request.py", line 544, in _open
    '_open', req)

  File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)

  File "/usr/lib/python3.6/urllib/request.py", line 1361, in https_open
    context=self._context, check_hostname=self._check_hostname)

  File "/usr/lib/python3.6/urllib/request.py", line 1320, in do_open
    raise URLError(err)

ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: calamares-settings-ubuntu-common 21
ProcVersionSignature: Ubuntu 4.18.0-7.8-generic 4.18.5
Uname: Linux 4.18.0-7-generic i686
ApportVersion: 2.20.10-0ubuntu11
Architecture: i386
CasperVersion: 1.396
CurrentDesktop: LXQt
Date: Thu Sep 27 18:53:20 2018
LiveMediaBuild: Lubuntu 18.10 "Cosmic Cuttlefish" - Beta i386 (20180927)
SourcePackage: calamares-settings-ubuntu
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
Revision history for this message
Adam Conrad (adconrad) wrote :

Can this failure be reproduced in English?

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1794844

tags: added: iso-testing
tags: added: lubuntu
Changed in calamares-settings-ubuntu (Ubuntu):
status: New → Incomplete
Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

Actually I wonder if the failure can be reproduced in French. Given the fail on the call to ipapi (US-based) and the fact that it doesn't fail all the time, I'm thinking perhaps a timeout error of some kind.

On the other hand, I'm told that importing urllib.request seems to produce different results than from urllib import request, so that may be part of the error. See here:
https://phab.lubuntu.me/D23
That should be able to be applied directly to /usr/lib/(i138-linux-gnu|x86_64-linux-gnu)/calamares/modules/automirror/main.py in a live system, then run the installer and see what happens.

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

I'm going to take back what I said about the timeout. The code does not specify one and the default is (this is for you, Adam) infinity:
https://stackoverflow.com/questions/29649173/what-is-the-global-default-timeout#29649638

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

Some error handling has been added so further identify potential problems.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for calamares-settings-ubuntu (Ubuntu) because there has been no activity for 60 days.]

Changed in calamares-settings-ubuntu (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.