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
When trying to download some videos from Ipla (not all of them), I got the following stacktrace:
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/bin/rtv", line 11, in <module>
sys.exit(main())
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/rtv/cli.py", line 22, in main
rtv.load(set(urls))
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python
3.6/site-packages/rtv/rtvdownloader.py", line 28, in load
extractor.run()
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/rtv/extractors/common.py", line 59, in run
entries = self.extract()
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/rtv/extractors/ipla.py", line 110, in extract
'date': self.get_date(),
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/rtv/extractors/ipla.py", line 62, in get_date
found_dates = search_dates(description, languages=['pl'])
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/search/__init__.py", line 33, in search_dates
result = _search_with_detection.search_dates(text=text, languages=languages, settings=settings)
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/conf.py", line 81, in wrapper
return f(*args, **kwargs)
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/search/search.py", line 221, in search_dates
settings=settings)}
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/search/search.py", line 153, in search_parse
original=original, translated=translated, settings=settings)
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/search/search.py", line 116, in parse_found_objects
parsed_item = self.parse_item(parser, item, translated[i], parsed, need_relative_base)
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/search/search.py", line 102, in parse_item
parsed_item = parser.get_date_data(item)
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/date.py", line 404, in get_date_data
locale, date_string, date_formats, settings=self._settings)
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/date.py", line 177, in parse
return instance._parse()
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/date.py", line 187, in _parse
date_obj = parser()
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/date.py", line 209, in _try_parser
self._get_translated_date(), settings=self._settings)
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/conf.py", line 81, in wrapper
return f(*args, **kwargs)
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/date_parser.py", line 26, in parse
date_obj, period = parse(date_string, settings=settings)
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/parser.py", line 70, in parse
raise exceptions.pop(-1)
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/parser.py", line 64, in parse
res = parser(datestring, settings)
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/parser.py", line 442, in parse
dateobj = po._correct_for_time_frame(dateobj)
File "/home/goblin/.local/share/virtualenvs/rtv-downloader-2I2VannR/lib/python3.6/site-packages/dateparser/parser.py", line 387, in _correct_for_time_frame
if self.now < dateobj.replace(tzinfo=None):
TypeError: can't compare offset-naive and offset-aware datetimes
Changing line 387 in dateparser/parser.py to if self.now.replace(tzinfo=None) < dateobj: helps (the video gets downloaded), but that's probably not the right solution.
The text was updated successfully, but these errors were encountered:
Changing line 387 in dateparser/parser.py to if self.now.replace(tzinfo=None) < dateobj: helps (the video gets downloaded), but that's probably not the right solution.
I changed two lines (396 and 404) from "if self.now < dateobj:" to "if self.now.replace(tzinfo=None) < dateobj:" in parser.py
Also, took me a while but to find the file tree where I installed dateparser, I used "pip show dateparser" and opened the parser.py script by following my file location that way.
This helped with using the feature search_dates from dateparser.search.
When trying to download some videos from Ipla (not all of them), I got the following stacktrace:
Changing line 387 in
dateparser/parser.py
toif self.now.replace(tzinfo=None) < dateobj:
helps (the video gets downloaded), but that's probably not the right solution.The text was updated successfully, but these errors were encountered: