How to troubleshoot PyPi issues

How to troubleshoot PyPi issues

AuthorFullName__c
Patrick Russell
articleNumber
000004152
ft:sourceType
Salesforce
FirstPublishedDate
2018-11-13T23:48:41Z
lastModifiedDate
2024-03-10T07:46:26Z
VersionNumber
7

Relevant versions: This information pertains to Artifactory versions 4.0.2 and above

When troubleshooting PyPI errors, it's best to compare what is supposed to happen against what your system is currently experiencing. You can eliminate a great deal of noise by simulating each step your client is taking and examining what HTTP error code is sent to you by Artifactory.

In general, these are the error codes you might encounter and where you should explore for answers/solutions next:

  • 403 and 401: Authentication issue, examine authorization settings
  • 404: Resource not found, check repository for resource
  • 400: Incorrect request, use cURL to get reason phrase
  • 50X: Server problem, examine artifactory.log

Using curl

The libcurl terminal application can make basic REST API commands, such as GET or PUT options. Artifactory's request logs display the exact API commands your PyPi client uses,  you can determine what exact commands to run based on this log file.

You can use the examples below, or substitute the one that is failing for you specifically. Doing so should yield further information on the problem, and possible next steps.

Basic cURL usage (with #comments):
 

curl -uadmin #Artifactory-username -vvv #verbosy -k #ignore-insecure-SSL -XGET #GET-request http://localhost:8081/artifactory/api/system/ping

cURL uses GET requests by default. Other commands, like PUT, require the --data field, along with the (Usually JSON) data payload. An example PUT command::

curl -uadmin:password -XPUT -H"Content-type: Application/json" --data '{"name":"test-group"}' http://localhost:8081/artifactory/api/security/groups/test-group