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

Authorization error #117

Open
bpabla50 opened this issue Feb 1, 2023 · 0 comments
Open

Authorization error #117

bpabla50 opened this issue Feb 1, 2023 · 0 comments

Comments

@bpabla50
Copy link

bpabla50 commented Feb 1, 2023

Hi 👍
I gave a try to run your project. Though our mantis does not have all the columns listed in your script, so I picked up the common ones, # if len(row_data) < 27:
if len(row_data) < 21:

I am getting this error:

python mantis_to_github.py
Processing issue ID 1728

Failed to create GitHub issue:
https://api.github.com/repos/bpabla50/pab_mantistogitlab/issues
{'Authorization': 'token ghp_unRSY6XYZClXCuFQMCUqXANdV65Nx73123kN', 'accept': 'application/vnd.github.v3+json'}
'Issue' object has no attribute 'tags'
******************************************************************************************
SUMMARY
******************************************************************************************
Found 1 issues in the CSV file

The way I created this token for my project on github gui : Settings, Developer settings, classic tokens
Thanks for any help.
BP

I did further work on it. Got rid of various columns, which are NOT there in my CSV file.
I think code dies in requests.post:
==
pab..headers
{'Authorization': 'token ghp_xyzSY6FKQClXCuFQMCUqXANdV65Nx73zvlkN', 'accept': 'application/vnd.github.v3+json'}
pab..e
argument of type 'NoneType' is not iterable
pab..finished exceptions
==
                       while try_again and not stop:
                            print("hello2")
                            r = requests.post(url, data={'website':'pabla'})
                            print("hello3")
                            print(r.ok)
                            **r = requests.post(
                                url, headers=headers, json=issue.to_github_api_fields()
                            )**      .looks like code is dying here. Any idea, what I am doing wrong here, my token look like ghp_*
                            print("hello")
                            print(r)
                            print(r.ok)
                            print(r.status_code)
==
start of while loop
hello2
hello3
False
Failed to create GitHub issue:


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