|
I am trying to setup a simple-repository-server with a simple-repsoitory-browser, but i get the following error. When i start both without the --stream-http-resources flag for the server i can search local and external packages (pypi.org) in the gui, but when i click on an external package no metadata are shown as expacted only an "Internal server error ()". showing local packages work fine. Also installing local and external packages via pip works fine. When using --stream-http-resources everything works. So there must be a problem with the redirection to pypi.org Here are the logs when trying to search for pandas and clicking on the package: i checked the redirected url and it is accessible from my device, is this a browser problem? I tired it with firefox, brave and chrome, same problem on all three. |
Replies: 1 comment 1 reply
|
Thanks for reporting! This is entirely on the server-side, and won't have anything to do with the browser. It is also a bit strange, since we explicitly setup the http client to follow redirects unconditionally https://github.com/simple-repository/simple-repository-server/blob/abde61874ec4c0be684371c273bf819c785cacf4/simple_repository_server/__main__.py#L109, yet clearly it isn't following a 302. Indeed, if I dig deeper, I can see that the http client in https://github.com/simple-repository/simple-repository-browser/blob/main/simple_repository_browser/_app.py#L56 is not being setup correctly. OK, so I identified the issue and was able to reproduce locally. I have made a fix in simple-repository/simple-repository-browser#38, which is available as Please let me know how you get on with it. |
Thanks for reporting! This is entirely on the server-side, and won't have anything to do with the browser.
It is also a bit strange, since we explicitly setup the http client to follow redirects unconditionally https://github.com/simple-repository/simple-repository-server/blob/abde61874ec4c0be684371c273bf819c785cacf4/simple_repository_server/__main__.py#L109, yet clearly it isn't following a 302.
Indeed, if I dig deeper, I can see that the http client in https://github.com/simple-repository/simple-repository-browser/blob/main/simple_repository_browser/_app.py#L56 is not being setup correctly.
OK, so I identified the issue and was able to reproduce locally.
I have made a fix in simple-repo…