[FOLIO-3864] OkapiCLI.py duplicates slash in url Created: 27/Jul/23  Updated: 10/Aug/23  Resolved: 10/Aug/23

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Bug Priority: TBD
Reporter: Julian Ladisch Assignee: Florian Gleixner
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Sprint:
Development Team: Other dev
Release: Not For Release

 Description   

Overview:
Example from docs duplicates slash resulting in URL with non-existing path

Steps to Reproduce:

  1. Use example from https://gitlab.lrz.de/bib-public/okapiclient#example-use-the-raw-module-to-list-users-with-username-containing-the-string-diku
  2. Replace placeholder host by folio snapshot host:
  3. ./OkapiCLI.py -v --url https://folio-snapshot-okapi.dev.folio.org --username diku_admin --password admin --tenant diku raw --rawpath "/users?query=username=diku"
  4. Execute

Expected Results:
Queries https://folio-snapshot-okapi.dev.folio.org/users?query=username=diku

Actual Results:
Queries https://folio-snapshot-okapi.dev.folio.org//users?query=username=diku

Traceback (most recent call last):
  File "./OkapiCLI.py", line 125, in <module>
    rawresult = client.makeAPICall(args.rawpath, method=args.method, data=data,
  File "/usr/local/lib/python3.8/dist-packages/pyOkapiClient-0.0.4-py3.8.egg/OkapiAPIClient/ApiClient.py", line 207, in makeAPICall
    raise PermissionError(
PermissionError: Got HTTP Return Code 404

Response Headers:
{'Date': 'Thu, 27 Jul 2023 11:55:20 GMT', 'Content-Type': 'text/plain', 'Content-Length': '66', 'Connection': 'keep-alive', 'content-encoding': 'gzip'}

Response Body:
No suitable module found for path and tenant


 Comments   
Comment by Florian Gleixner [ 10/Aug/23 ]

Fixed in 0.0.6. Thank you for reporting.

Comment by Florian Gleixner [ 10/Aug/23 ]

Fixed in 0.0.6

Generated at Thu Feb 08 23:31:21 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.