janw / podcast-archiver

Archive all your favorite podcasts
MIT License
118 stars 21 forks source link

Validation issues with feeds that work in apps #141

Closed mainrs closed 5 months ago

mainrs commented 6 months ago

I get the following errors when updating my podcasts:

DEBUG    https://feeds.megaphone.fm:443 "GET /QCD1940458558 HTTP/1.1" 200 3195                                                                                        connectionpool.py:549
           ERROR    Invalid feed                                                                                                                                                       processor.py:65
                    Traceback (most recent call last):                                                                                                                                                
                      File "/home/me/.local/pipx/venvs/podcast-archiver/lib/python3.11/site-packages/podcast_archiver/processor.py", line 58, in process                                              
                        feed = Feed.from_url(url)                                                                                                                                                     
                               ^^^^^^^^^^^^^^^^^^                                                                                                                                                     
                      File "/home/me/.local/pipx/venvs/podcast-archiver/lib/python3.11/site-packages/podcast_archiver/models.py", line 190, in from_url                                               
                        return cls(page=FeedPage.from_url(url), url=url)                                                                                                                              
                                        ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                        
                      File "/home/me/.local/pipx/venvs/podcast-archiver/lib/python3.11/site-packages/podcast_archiver/models.py", line 165, in from_url                                               
                        return cls.model_validate(feedobj)                                                                                                                                            
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                            
                      File "/home/me/.local/pipx/venvs/podcast-archiver/lib/python3.11/site-packages/pydantic/main.py", line 509, in model_validate                                                   
                        return cls.__pydantic_validator__.validate_python(                                                                                                                            
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                            
                    pydantic_core._pydantic_core.ValidationError: 1 validation error for FeedPage                                                                                                     
                    feed.link                                                                                                                                                                         
                      Input should be a valid URL, relative URL without a base                                                                                                                        
                        For further information visit https://errors.pydantic.dev/2.6/v/url_parsing
janw commented 5 months ago

Fixed in 1.4.2, thank you for reporting!

mainrs commented 5 months ago

Appreciate it, thanks!

janw commented 5 months ago

Sorry, forgot half of it. 🤦 v1.4.4 has it working now.