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
Hi, I'm new at all of this so excuse me if this is a dumb mistake or if this is the wrong place to ask this. If theres somewhere better to ask this as well, please let me know.
I'm trying to update the locations of barcodes using this method in archivesspace :
but I am using python, so it looks like:
response = requests.request("POST", url, params={'ids':[1,2,3,4,5], 'location_uri':'ABClocation1'}, headers=headers)
but it is not behaving correctly. If anyone could give some advice that would be awesome.
Expected Behavior
what should happen (hopefully), is that I'm able to attatch a barcode (from 'ids') to a location ('location_uri').
Current Behavior
currently, when I run my code with
print(response)
print(json.loads(response.text))
I am getting the error:
<Response [400]>
{'error': {'ids': ["Wanted type [Integer] but got '5'"]}}
Possible Solution
This error could possibly be because I am using python, I checked and I am using a integer type for sure. In one of my tests of this code, I even tried to wrap a number I was using as the value for 'ids' with int() and still got the same issue.
My thoughts were that I possibly have the wrong url or that the way that I have written out my parameters in calling post is wrong?
Your Environment
Environment name and version (e.g. Chrome 39, node.js 5.4): Python 3.0
Operating System and version (desktop or mobile): Apple 13.3 inch Intel processor
The text was updated successfully, but these errors were encountered:
Hi, I'm new at all of this so excuse me if this is a dumb mistake or if this is the wrong place to ask this. If theres somewhere better to ask this as well, please let me know.
I'm trying to update the locations of barcodes using this method in archivesspace :
https://archivesspace.github.io/archivesspace/api/?python#update-location-for-a-batch-of-top-containers
Just to test it out, I've just been running my code with the example:
client.post('repositories/2/top_containers/batch/location',
params={ 'ids': [1,2,3,4,5],
'location_uri': 'locations/1234' })
but I am using python, so it looks like:
response = requests.request("POST", url, params={'ids':[1,2,3,4,5], 'location_uri':'ABClocation1'}, headers=headers)
but it is not behaving correctly. If anyone could give some advice that would be awesome.
Expected Behavior
what should happen (hopefully), is that I'm able to attatch a barcode (from 'ids') to a location ('location_uri').
Current Behavior
currently, when I run my code with
print(response)
print(json.loads(response.text))
I am getting the error:
<Response [400]>
{'error': {'ids': ["Wanted type [Integer] but got '5'"]}}
Possible Solution
This error could possibly be because I am using python, I checked and I am using a integer type for sure. In one of my tests of this code, I even tried to wrap a number I was using as the value for 'ids' with int() and still got the same issue.
My thoughts were that I possibly have the wrong url or that the way that I have written out my parameters in calling post is wrong?
Your Environment
The text was updated successfully, but these errors were encountered: