I'm using jira-python library to gain API access to our company account on Jira.
This is the block of code that should work according to the docs:
from jira.client import JIRA
jira = JIRA(options={'server': 'https://jira.xyz.co.uk'},
basic_auth=('marek#xyz.co.uk', 'my_token'))
Taking into account the fact that cookie-based authentication no longer works I generated API tokens and parsed them into code, yet I'm getting error:
WARNING:root:Got recoverable error from GET https://jira.xyz.co.uk/rest/api/2/serverInfo, will retry [2/3] in 5.527397890949137s. Err: 401
And this just loops and loops until I hit Ctrl+c.
I found this topic here Issue in connecting with JIRA python where somebody asked the very same question but the solution didn't work for me as the missing libraries aren't missing on my system.
What else I could try ?
Related
I am trying to invoke Azure Batch Rest API to create a pool from ADF.
Below is the Post url I am trying -
https://management.azure.com/subscriptions/a01c19ca-c50f-4be0-904d-xxxxxxxxxxxx/resourceGroups/
sumo-dev-rg/providers/Microsoft.Batch/batchAccounts/sumobatch/pools/testpool?api-version=2021-01-01
testpool above doesn't exist but something that should be created once the RestAPi runs successfully.
However, I am getting the following error code -
Error details
Error code 2108
Troubleshooting guide
Failure type
User configuration issue
Details
{"error":{"code":"InvalidUri","message":"The requested URI does not represent any resource on the server.\nRequestId:b512af12-c1b7-474a-9773-dcf034b07e0e\nTime:2021-07-18T05:57:31.4199546Z","target":"BatchAccount","details":[{"code":"UriPath","message":"/subscriptions/a01c19ca-c50f-4be0-904d-************/resourceGroups/
sumo-dev-rg/providers/Microsoft.Batch/batchAccounts/sumobatch/pools/testpool"}]}}
Source Pipeline poolstart
Any leads will be highly appreciated ?
Thank you Poon. Posting your comment as Answer to help other community members.
Adding the PUT before the URL fixed the issue
hope everyone is well.
I am using azure library to fetch access token using the below code snippet, but getting an error
Execution of class com.microsoft.aad.msal4j.AcquireTokenByAuthorizationGrantSupplier failed.
com.microsoft.aad.msal4j.MsalClientException: java.net.SocketException: Connection reset
When I enclose the code in try catch, it gets catched as an ExecutionException.
Below is the code snippet.
ConfidentialClientApplication app = ConfidentialClientApplication.builder("XXX", ClientCredentialFactory.createFromCertificate(XXX, "")).authority("https://login.microsoftonline.com/XXX").build();
ClientCredentialParameters clientCredentialParam = ClientCredentialParameters.builder(Collections.singleton(String.format(https://graph.microsoft.com/.default))).build();
CompletableFuture future = app.acquireToken(clientCredentialParam);
//call to future.get() function
I appreciate if anyone could help me in this issue as I am unable to find any solution for this for the past 2 weeks, tried so many ways but no success.
Thanks
I am trying to run paragraphs using zeppelin spark object method
z.run("noteId","paragraphId")
z.run("paragraphId")
I have tried both the methods, but nothing seems to be triggering the next paragraph. I do not get any errors also. Please let me know if I am missing something here.
On checking the zeppelin server logs I am getting the below error :
ERROR [2020-08-26 15:46:37,742] ({Thread-35} RemoteInterpreterEventPoller.java[run]:250) - Can't handle event RemoteInterpreterEvent(type:RUN_INTERPRETER_CONTEXT_RUNNER, data:{"logger":{"traceCapable":true,"name":"org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$ParagraphRunner"},"noteId":"2FHDFMR16","paragraphId":"20200819-131115_701985359"})
org.apache.zeppelin.rest.exception.ForbiddenException: HTTP 403 Forbidden
at org.apache.zeppelin.socket.NotebookServer.onRemoteRunParagraph(NotebookServer.java:2153)
at org.apache.zeppelin.interpreter.remote.RemoteInterpreterEventPoller.run(RemoteInterpreterEventPoller.java:141)
I have created my notebook using the admin user only. Do we need to provide any special access? I am just using admin user.
Update 1:
I changed notebook settings in which we removed user and owner permissions. It's triggering, but it's with an anonymous user. It will be a problem if we are working in multi-user environment.
I think instead of that
Try
z.z.run
I've seen a few people over the years facing similar issue but I haven't found much regarding my case.
I have a backend built with python3.
I am using firebase_admin as a library to connect to Firebase Cloud Firestore.
I then commit my code to Github and using Github Actions
I am deploying the docker container to Google Cloud Run.
This all works fine for some time
Some time later throws the following exception: Exception: 401 Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
What am I doing wrong?
Should I connect every time I call the function? (move the db initialization in each function call)
Feels like the token expired. Can I refresh it somehow?
Python code:
from firebase_admin import firestore, initialize_app
initialize_app()
db = firestore.client()
def get_info_from_firestore(name: str:
try:
data = db.collection(u'data').where(u'title', u'==', name).stream()
for rating in ratings:
return rating.to_dict()
return None
except Exception as e:
logging.warning(Exception: {e}')
return None
And this file is imported from my root python file that's using Flask.
Edit: One final thing that might help, if I redeploy my container without any changes it all works again.
Likely this is happening due to time drift: time in docker significatly differs realtime. After restart time is in sync but after a while it drifts. Google does not like it. See more info about this WSL/container issue here https://github.com/microsoft/WSL/issues/4245 and here https://github.com/docker/for-win/issues/4526
In the last couple of weeks, Create Task API Call for ASANA stopped working.
This code has been working for last 6 months but now it fails.
The error I get is
The remote server returned an error: (434) Client Error (434).
According to the ASANA website
https://asana.com/developers/documentation/getting-started/errors
434 means Deprecated
but I am not sure what is Deprecated.
Does anybody have any suggestions I can try to get to the bottom of this?
API Key is deprecated.
Use this page to change it: https://asana.com/developers/feed/api-key-deprecation