Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does pyarr supports https? #178

Open
2 tasks done
blastbeng opened this issue Sep 18, 2024 · 0 comments
Open
2 tasks done

Does pyarr supports https? #178

blastbeng opened this issue Sep 18, 2024 · 0 comments
Labels
type/bug Something isn't working

Comments

@blastbeng
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behaviour

I have implemented pyarr in my project and i am trying to connect to lidarr via https but it fails.

Steps To Reproduce

Run the code I attached

Expected behaviour

Connect to lidarr via https

Pyarr Version

5.2.0

Python Version

3.10

Example Code

from pyarr import LidarrAPI
ipaddress="127.0.0.1"
port="8686"
base_api_path=""
ssl="https"
api_token="xxxxxxxxxxxx"

lidarr_url = ssl + "://" + ipaddress + ":" + port + base_api_path
lidarr_client = LidarrAPI(lidarr_url,api_token)

lidarr_client.get_artist()

Relevant log output

2024-09-18 10:20:35 ERROR    <class 'pyarr.exceptions.PyarrBadRequest'> subsonic_helper.py 153                                                                                               
Traceback (most recent call last):                                                                                                                                                           
  File "/home/user/spotisub/./spotisub/helpers/subsonic_helper.py", line 153, in write_playlist                                                                                              
    is_monitored = lidarr_helper.is_artist_monitored(artist_name_spotify)                                                                                                                    
  File "/home/user/spotisub/./spotisub/helpers/lidarr_helper.py", line 29, in is_artist_monitored                                                                                            
    artists_list = lidarr_client.get_artist()                                                                                                                                                
  File "/home/user/.local/lib/python3.10/site-packages/pyarr/lidarr.py", line 116, in get_artist                                                                                             
    return self._get(                                                                                                                                                                        
  File "/home/user/.local/lib/python3.10/site-packages/pyarr/request_handler.py", line 91, in _get                                                                                           
    response = _process_response(res)                                                                                                                                                        
  File "/home/user/.local/lib/python3.10/site-packages/pyarr/request_handler.py", line 233, in _process_response                                                                             
    raise PyarrBadRequest(f"Bad Request, possibly a bug. {str(res.content)}")                                                                                                                
pyarr.exceptions.PyarrBadRequest: Bad Request, possibly a bug. b'<html>\r\n<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>\r\n<body>\r\n<center><h1>400 Bad Req
uest</h1></center>\r\n<center>The plain HTTP request was sent to HTTPS port</center>\r\n<hr><center>nginx/1.26.2</center>\r\n</body>\r\n</html>\r\n'

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant