I use the Python JIRA API wrapper almost daily to log time, add comments, and transition issues. Recently my team decided to replace the "Roadblock" status with an "Impediment" flag. My issue is that I cannot flag/unflag an issue from within an issue (https://jira.atlassian.com/browse/JSWSERVER-16346).
The following code to update customfield_10500 (the flag) does not work:
jira = JIRA(options=options, basic_auth=(os.getenv('user'), os.getenv('pass')))
i = jira.issue('BIS-9')
i.update(fields={
'customfield_10500' : {'value' : 'Impediment'}
})
The error
JIRAError: JiraError HTTP 400 url
response text = {"errorMessages":[],"errors":{"customfield_10500":"Field 'customfield_10500' cannot be set. It is not on the appropriate screen, or unknown."}}
I know the field must be set within the Kanban board, but I don't know how to do this using the Python wrapper.
Is there a way to do this?
I've found this but don't know how to translate it.
If you want to update a customfield through RestApi the customfield should be added into the Edit Mode Screen.
I believe this is why it is showing the above error
Related
Just built my first Shopify store and wanted to use python and API to bulk-update product tags on all our products.
However, I've run into a snag on my PUT call. I keep getting a 400 Response with the message '{"errors":{"product":"Required parameter missing or invalid"}}'.
I've seen other people with similar issues on here but none of their solutions seem to be working for me.
Has anyone else run into this problem that can help me figure it out?
Here are some screenshots of my code, a printout of the payload, and the error in the response.
Code, Payload and Response:
I can successfully get the product info using the API and was originally sending the entire JSON payload that was returned just updated it with my product tags and sent it back through the API.
To narrow potential pain points, I'm keeping it simple now and just including "id" and "tags" in the payload but still get the same error.
We figured it out! It turns out that when we initially created the store we used a domain store name that was misspelled so we created a new domain store name with the correct spelling. However, the original domain store name was not deleted (not even sure it can be), and even though the new domain store name forwards to the original one and allows for GET requests, for PUT requests we had to use the original misspelled domain store name and the PUTs work fine.
I figured this out by using fiddler to capture a manual product update via the Shopify website to see what the payload looked like and that's why I noticed the store URL was different than the one we were using.
Hope this helps someone with a similar issue!
Going to try asking this here.
I'm trying to write an error message from an Azure Data Factory pipeline to a table in SQL server. It needs to capture the error message from a Databricks Python job. I can't find any official documentation and the method I have found from this source:
#{activity('Proc source').error.message}
..doesn't write anything to the table. Just a blank string with no explanation.
Why data factory doesn't just have an area where you can view the details of errors instead of just saying "Failed" is beyond me. Or if it does, it's hidden away.
Does anyone have any ideas?
You can see the details of error at here.
#{activity('Proc source').error.message}
This expression works.
Is errorCode saved to your table?Make sure your activity name is correct.
SOLVED:
For anyone else reading this, the problem turned out to be something very stupid. I'd included a space in the python file name.
This returned an error code of 3202 and a blank error message.
I had another problem and resolution after this that I'd like to share, again for anyone frantically googling a solution to the problem. Once I'd removed spaces from the python filename, I logged an error code of '3204'
and the error message: "Databricks execution failed with error message: . Run page url: (link to page showing clusters)". In the Databricks workspace launchable through the Azure portal, selecting a cluster through the 'clusters' sidebar then heading to 'Driver Logs' will show errors, in the 'Standard error' window that comes up.
I had already installed the libraries I needed on an existing cluster, but I'd forgotten to change a setting in the Databricks linked service. 'Select cluster' was set to 'new job cluster' when I needed 'Existing interactive cluster'. Thus, it wasn't pointing to the cluster I had expected.
These are all fairly small errors as it turns out, but again I hope that someone else dealing with the same issues will be able to find this post and save themselves some hassle!
I am currently attempting to create an issue within JIRA via API and have been running across an issue that I have no clue to fix.
I used a curl command to find the components and I got the following:
"components":[{"self":"https://jira-server/rest/api/2/component/18458","id":"18458","name":"JIRA","description":"#"},{"self":"https://jira-server/rest/api/2/component/18463","id":"18463","name":"JIRA"}]
when I run my script by using python-JIRA API with the following command:
new_issue = jira.create_issue(project='IT', summary='New issue from jira-python', description='look here', issuetype={'name': 'Task'}, components = [{'name': "JIRA"}])
I get the following error message:
response text = {"errorMessages":[],"errors":{"components":"Component name 'JIRA' is not valid"}}
Can anyone tell me what exactly I am doing wrong? I am 100% "JIRA" is a component since I manually created a test issue and selected "JIRA" as a component.
You have to make sure the Component you're linking to belongs to the same Jira Project that your issue is being created under
I believe your issue might be that you have too many brackets, components = [{'name': "JIRA"}] should be components = {'name': "JIRA"}
This is what I think your error is trying to tell you too when it says "errorMessages":[]....., the api only expects one set of brackets and passing it a set with information enclosed in another pair sets it off.
However I have not tried this solution but I do know it works when using issuetype = {'name' : 'Bug'}
Alternatively you probably don't even need the components part, it should create the issue with the other items given, if it doesn't its probably another field that only task requires. If you try to create an epic you need customfield_10814 to be filled with a description and for bug you need to fill the found at location.
The syntax is correct. components should be a list.
Did you create 'JIRA' as a component in the same project?
Make sure the component name is available for that project. If you go to any ticket in the same project, the 'dropdown' in the component section should list all the available components.
Create a component for 'JIRA' . From error it seems you project doesn't have any value called 'JIRA' .
Creation of value 'JIRA' for component will solve the problem
I have set up a telescope project and want to use embedly to get thumbnails. I am running on localhost.
I got an API key from embedly, placed the key into the telescope settings, and ran the Meteor.call('fetchFeeds') to pull info info. from RSS feeds.
The articles load fine and are posted but I am getting errors of:
I20150827-18:02:31.030(-5)? Couldn't find an Embedly API key! Please add it to your Telescope
enter code here settings or remove the Embedly module.
and no thumbnails show up.
I have tired reinstalling telescope, reinstalling module from embedly, and I checked in embedly and I do not have any API requests so I know it is something in telescope. I doubled check API key and generated new one tried that one too.
Can anyone help? I'm at a loss for what's happening.
You need to provide a width and height otherwise the error shows up as not providing an API key.
I'm trying to make a cms with Python to post new targets to a cloud database on vuforia. I found this Python library "python-vuforia" but it has read functionalities only.
I added a function to post targets but so far getting 401 error. you can find the new function in this commit
What am I doing wrong?
Got it working with this (commit)[https://github.com/dadoeyad/python-vuforia/commit/1997a49f94c5f2e13ab1d5c620c69160c76b7969]
I think the problem was with doing str(req.get_data()) instead of req.get_data()
and base64.b64encode(hmac(key, message, sha1).digest()) instead of hmac(key, message, sha1).digest().encode('base64')