Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I've a problem...... #214

Open
NSH531 opened this issue May 3, 2022 · 0 comments
Open

I've a problem...... #214

NSH531 opened this issue May 3, 2022 · 0 comments

Comments

@NSH531
Copy link

NSH531 commented May 3, 2022

how to solve this.....???
(I attached traceback & source code)


service=rauth.OAuth2Service(client_id=client_id,client_secret=secret,base_url="https://api.crowdstrike.com/")

tr=""
data={"token": f"{tr}"}
def get_access_token(service):
        session = service.get_auth_session(data=data, decoder=json.loads)
        access_token = session.access_token
        tr=access_token



session = service.get_auth_session(data=data, decoder=json.loads)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\netanelst\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\rauth\service.py", line 556, in get_auth_session
    session = self.get_session(self.get_access_token(method, **kwargs))
  File "C:\Users\netanelst\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\rauth\service.py", line 541, in get_access_token
    r = self.get_raw_access_token(method, **kwargs)
  File "C:\Users\netanelst\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\rauth\service.py", line 516, in get_raw_access_token
    self.access_token_response = session.request(method,
  File "C:\Users\netanelst\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\rauth\session.py", line 345, in request
    url = self._set_url(url)
  File "C:\Users\netanelst\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\rauth\session.py", line 40, in _set_url
    not absolute_url(url):
  File "C:\Users\netanelst\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\rauth\utils.py", line 20, in absolute_url
    return url.startswith(('http://', 'https://'))
AttributeError: 'NoneType' object has no attribute 'startswith'

thanks
Netanel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant