You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While attempting to transfer assets using the kobo-transfer tool, I encountered multiple issues related to URL construction and validation. Below are the details of the errors and observations:
HTTP Error:
File "/usr/lib/python3/dist-packages/requests/models.py", line 943, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://kf.mydomain.com/api/v2/assets/.json
The function def _validate_config(self) fails if any assets are not deployed, even though some assets are successfully deployed
Validation Issue:
The function def _validate_config fails if any assets are not deployed, even though some assets status is deployed deployed. This behavior halts the transfer process unnecessarily.
Steps to Reproduce
Use the kobo-transfer tool to transfer assets.
Observe the constructed URL and note the addition of an extra . before .json.
Attempt to transfer assets when some are deployed, and some are not.
Proposed Fixes
URL Construction:
Investigate the logic constructing asset_url and asset_url_json.
Ensure no trailing slashes or unnecessary dots are appended to the base URL.
Validation Logic:
Modify _validate_config(self) to allow the transfer of deployed assets even if some assets are not deployed.
Description
While attempting to transfer assets using the kobo-transfer tool, I encountered multiple issues related to URL construction and validation. Below are the details of the errors and observations:
HTTP Error:
File "/usr/lib/python3/dist-packages/requests/models.py", line 943, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://kf.mydomain.com/api/v2/assets/.json
URL Construction Issue:
Issue 1
The constructed URL seems incorrect:
asset_url and asset_url_json
Http request to https://kf.mydomain.com/api/v2/assets/.json returns HTTPError: 404
Expected URL: https://kf.mydomain.com/api/v2/assets.json
When visiting the correct URL (https://kf.mydomain.com/api/v2/assets.json), I receive a valid JSON response.
Issue 2
The function def _validate_config(self) fails if any assets are not deployed, even though some assets are successfully deployed
Validation Issue:
The function def _validate_config fails if any assets are not deployed, even though some assets status is deployed deployed. This behavior halts the transfer process unnecessarily.
Steps to Reproduce
Use the kobo-transfer tool to transfer assets.
Observe the constructed URL and note the addition of an extra . before .json.
Attempt to transfer assets when some are deployed, and some are not.
Proposed Fixes
URL Construction:
Investigate the logic constructing asset_url and asset_url_json.
Ensure no trailing slashes or unnecessary dots are appended to the base URL.
Validation Logic:
Modify _validate_config(self) to allow the transfer of deployed assets even if some assets are not deployed.
Environment:
Tool: kobo-transfer
Python Version: ., Python 3.10
Platform: Ubuntu 22.04
The text was updated successfully, but these errors were encountered: