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

TypeError when changing base URL #2

Open
kylemarsh opened this issue Feb 3, 2021 · 3 comments
Open

TypeError when changing base URL #2

kylemarsh opened this issue Feb 3, 2021 · 3 comments

Comments

@kylemarsh
Copy link

I wanted to use this for work, so I tried changing the base URL from api.github.com to api.github.$workdomain.com in the two places I found it in config.py (I wanted to do a quick test before adding a new config option and submitting a PR) and while syncing works fine I get a TypeError when trying to launch the viewer:
TypeError: sequence item 1: expected str instance, NoneType found

I browsed the sqlite database and nothing jumps out at me as being obviously missing.

@robdmc
Copy link
Owner

robdmc commented Feb 3, 2021

@kylemarsh I don't suppose there's any way you could share ~/.config/gistfinder/database.sqlite with me is there? If not, could you post the whole stack trace?

@robdmc
Copy link
Owner

robdmc commented Feb 3, 2021

Actually... @kylemarsh I think I found the problem. Fix incoming.

@robdmc
Copy link
Owner

robdmc commented Feb 3, 2021

@kylemarsh Just pushed new version

pip install -U gistfinder

Should give you version 0.2.4

I don't expect your use case to be very common, so, for now I didn't want to create a separate config for it. I might in the future.

But... to keep you from having to edit any code or keep a fork in sync, try this.

# Replace the values in quotes with your enterprise links (maybe add this to your .bashrc)
export GISTFINDER_API_URL="'https://api.github.com/users"
export GISTFINDER_URL="https://gist.github.com"

gistfinder --reset

Since I don't have access to enterprise account, I have no way to test it. Would you be able to tell me if it works?

Also... a bit of a shameless plug, but at work I'm constantly juggling access urls/keys for different services.
I wrote this so I could put all that config in a central place and just run my day-to-day with env vars placing me in the appropriate context.
https://github.com/robdmc/switchenv

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

2 participants