aio-libs / aiohttp

Asynchronous HTTP client/server framework for asyncio and Python
https://docs.aiohttp.org
Other
15.08k stars 2.01k forks source link

Error upon attempt to download https://dieunbestechlichen.com/feed #8193

Closed sjehuda closed 7 months ago

sjehuda commented 7 months ago

Describe the bug

Greetings!

An attempt to subscribe to https://dieunbestechlichen.com/feed results in an exception.

To Reproduce

  1. Install Slixfeed;
  2. Send https://dieunbestechlichen.com/feed to the Slixfeed news bot;
  3. Error.

Expected behavior

Fetching the data as XML data to process.

Logs/tracebacks

ERROR:slixmpp.basexmpp:Constructor parameter should be str
Traceback (most recent call last):
  File "/usr/local/slixfeed/.venv/lib/python3.11/site-packages/slixmpp/xmlstream/xmlstream.py", line 1107, in handler_callback_routine
    await cb(data)
  File "/usr/local/slixfeed/.venv/lib/python3.11/site-packages/slixfeed/xmpp/client.py", line 265, in on_message
    await process.message(self, message)
  File "/usr/local/slixfeed/.venv/lib/python3.11/site-packages/slixfeed/xmpp/process.py", line 632, in message
    result = await action.add_feed(db_file, url)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/slixfeed/.venv/lib/python3.11/site-packages/slixfeed/action.py", line 673, in add_feed
    result = await fetch.http(url)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/slixfeed/.venv/lib/python3.11/site-packages/slixfeed/fetch.py", line 132, in http
    async with session.get(url, proxy=proxy,
  File "/usr/local/slixfeed/.venv/lib/python3.11/site-packages/aiohttp/client.py", line 1194, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/slixfeed/.venv/lib/python3.11/site-packages/aiohttp/client.py", line 449, in _request
    url = self._build_url(str_or_url)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/slixfeed/.venv/lib/python3.11/site-packages/aiohttp/client.py", line 376, in _build_url
    url = URL(str_or_url)
          ^^^^^^^^^^^^^^^
  File "/usr/local/slixfeed/.venv/lib/python3.11/site-packages/yarl/_url.py", line 179, in __new__
    raise TypeError("Constructor parameter should be str")
TypeError: Constructor parameter should be str

Python Version

$ python --version
Python 3.11.7

aiohttp Version

$ python -m pip show aiohttp
Name: aiohttp
Version: 3.9.1
Summary: Async http client/server framework (asyncio)
Home-page: https://github.com/aio-libs/aiohttp
Author: 
Author-email: 
License: Apache 2
Location: /usr/lib/python3.11/site-packages
Requires: aiosignal, attrs, frozenlist, multidict, yarl
Required-by: aiohttp-socks, Electrum

multidict Version

$ python -m pip show multidict
Name: multidict
Version: 6.0.4
Summary: multidict implementation
Home-page: https://github.com/aio-libs/multidict
Author: Andrew Svetlov
Author-email: andrew.svetlov@gmail.com                                      
License: Apache 2                                                           
Location: /usr/lib/python3.11/site-packages                                 
Requires:                                                                   
Required-by: aiohttp, yarl

yarl Version

$ python -m pip show yarl
Name: yarl                                                                  
Version: 1.9.4                                                              
Summary: Yet another URL library                                            
Home-page: https://github.com/aio-libs/yarl                                 
Author: Andrew Svetlov
Author-email: andrew.svetlov@gmail.com
License: Apache-2.0
Location: /usr/lib/python3.11/site-packages
Requires: idna, multidict
Required-by: aiohttp

OS

Arch Linux

Related component

Client

Additional context

No response

Code of Conduct

sjehuda commented 7 months ago

Slixfeed project page https://gitgud.io/sjehuda/slixfeed

Dreamsorcerer commented 7 months ago

I'm unclear why you're raising an aiohttp issue. Your report is little more than "some other project doesn't work". The error message suggests that project is passing an invalid type as the URL.

(In other words, please provide enough information to explain what the issue is with aiohttp and a way to reproduce it directly).

sjehuda commented 7 months ago

I will investigate the matter further and report back, if I see fit.