dglent / meteo-qt

System tray application for weather status information
GNU General Public License v3.0
82 stars 21 forks source link

http.client.BadStatusLine Aborted (core dumped) #76

Closed juancarlospaco closed 6 years ago

juancarlospaco commented 6 years ago
juan@x ~  $ meteo-qt 
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/meteo_qt/meteo_qt.py", line 763, in run
    timeout=5)
  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 1346, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib/python3.6/urllib/request.py", line 1321, in do_open
    r = h.getresponse()
  File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
    response.begin()
  File "/usr/lib/python3.6/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.6/http/client.py", line 279, in _read_status
    raise BadStatusLine(line)
http.client.BadStatusLine: <?xml version="1.0" encoding="UTF-8"?>
Aborted (core dumped)

juan@x ~  $ cat ~/.config/meteo-qt/meteo-qt.log
07/09/2018 15:39:03 ERROR: Error closing overviewcity: <class 'AttributeError'> - meteo_qt - root

juan@x ~  $ cat ~/.config/meteo-qt/meteo-qt.conf
[General]
APPID=XXX_REMOVED_THIS_FOR_SECURITY_XXX
CitiesTranslation={}
City=Buenos Aires
CityList=[]
Country=AR
FontSize=20
ID=XXX_REMOVED_THIS_FOR_SECURITY_XXX
Interval=120
Proxy=False
TrayColor=#ffffff
Unit=metric

[Logging]
Level=INFO

[SearchCity]
Geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x2\0\0\0\0\x3\xe\0\0\x1\xa7\0\0\x4\xed\0\0\x2\xd8\0\0\x3\xe\0\0\x1\xa7\0\0\x4\xed\0\0\x2\xd8\0\0\0\0\0\0\0\0\a\x80)

juan@x ~  $ python --version
Python 3.6.6

juan@x ~  $ lsb_release -a
LSB Version:    1.4
Distributor ID: Arch
Description:    Arch Linux
Release:        rolling
Codename:       n/a

juan@x ~  $ uname -a
Linux x 4.17.4-1-ARCH #1 SMP PREEMPT Tue Jul 3 15:45:09 UTC 2018 x86_64 GNU/Linux

juan@x ~  $

City: Buenos Aires, Argentina. Qt5, KDE, API Key configured.

dglent commented 6 years ago

Do you have the latest version ? I tried with the city Buenos Aires, everything works fine here

juancarlospaco commented 6 years ago

Yes. I tried with the city Buenos Aires, everything works fine on another computer, but on this computer fails, I dunno why.

Arch is using Python 3.7 now BTW. Is there a cache or config that I should delete?.

dglent commented 6 years ago

The problem occurs only with the city of Buenos Aires ? If so, try to remove the city and add it again You can remove the config file ~/.config/meteo-qt/meteo-qt.conf and try again Which version of meteo-qt you have ?

To go further: Open the file ~/.config/meteo-qt/meteo-qt.conf and change the logging level to DEBUG

[Logging] Level=DEBUG

Then run the program in the terminal and check which url makes the crash Then open this url manually in the browser to see the content

juancarlospaco commented 6 years ago

I deleted ~/.config/meteo-qt/meteo-qt.conf and now it works. An option to start with a blank config should be cool, like meteo-qt --reset. Its kinda solved, I am closing.