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

"Submit" Button Does Nothing #3

Open
TheTallestHobbit opened this issue Mar 6, 2024 · 5 comments
Open

"Submit" Button Does Nothing #3

TheTallestHobbit opened this issue Mar 6, 2024 · 5 comments

Comments

@TheTallestHobbit
Copy link

I got everything running via Docker, and I'm on the localhost:3000 web app. I Entered my repo URL in the form of https://github.com/GitHubUser/GitHubRepo and left the documentation URL blank. I have "All Files" selected. I click the "Submit" button and nothing happens. I don't see any debug output in the "docker compose up" window - not sure if I'm supposed to. I don't see any log files in my local copy of the repo. Nothing happens at all when I click "Submit"

@JeremiahPetersen
Copy link
Owner

JeremiahPetersen commented Mar 6, 2024

@TheTallestHobbit thank you for bringing this up. I am going through the repo again today and will see if i can figure out what is happening here. Will report back after some testing. is there anything that comes up in terminal when you click submit, or no action at all? Also are you on mac/pc/linux ?

@JeremiahPetersen
Copy link
Owner

JeremiahPetersen commented Mar 7, 2024

@TheTallestHobbit i just updated the repo to remove .dockerfile in the yml. pull the latest change and try it out again. let me know if this fixes the issue for you. if not, I will look into this further. -- i just went through cloning the repo to another computer and ran RepoToText successfully on itself. (https://github.com/JeremiahPetersen/RepoToText) it did take a little bit to populate after clicking submit (8 seconds ish). if the repo is large, it may take longer than you expect. should not take longer than 30 seconds though. you can check in the terminal and see

backend-1 | XXX.XX.X.X - - [07/Mar/2024 00:34:06] "OPTIONS /scrape HTTP/1.1" 200 -
backend-1 | XXX.XX.X.X - - [07/Mar/2024 00:34:18] "POST /scrape HTTP/1.1" 200 -

you then should see it populate in the text area and also in the "Data" folder in the repo.

@shaayaansayed
Copy link

shaayaansayed commented Mar 13, 2024

UPDATE: I was using the wrong URL. You want to use the HTTPS URL under the green "Code" button on the repo's page. I also needed to strip the ".git" extension.

The original URL was: https://github.com/smart-on-fhir/client-py.git which threw an error. But https://github.com/smart-on-fhir/client-py worked.


I'm getting the following error. Note, I'm on mac.

Looks like its failing at:

repo = github_instance.get_repo(self.repo_name)

I'm using the https link in the "Enter Github repo URL" entry, specifically: https://github.com/smart-on-fhir/client-py/tree/master which points to here.

backend-1   | 192.168.65.1 - - [13/Mar/2024 23:57:09] "OPTIONS /scrape HTTP/1.1" 200 -
backend-1   | [2024-03-13 23:57:09,972] ERROR in app: Exception on /scrape [POST]
backend-1   | Traceback (most recent call last):
backend-1   |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1463, in wsgi_app
backend-1   |     response = self.full_dispatch_request()
backend-1   |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 872, in full_dispatch_request
backend-1   |     rv = self.handle_user_exception(e)
backend-1   |   File "/usr/local/lib/python3.8/site-packages/flask_cors/extension.py", line 176, in wrapped_function
backend-1   |     return cors_after_request(app.make_response(f(*args, **kwargs)))
backend-1   |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 870, in full_dispatch_request
backend-1   |     rv = self.dispatch_request()
backend-1   |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 855, in dispatch_request
backend-1   |     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
backend-1   |   File "RepoToText.py", line 133, in scrape
backend-1   |     filename = scraper.run()
backend-1   |   File "RepoToText.py", line 107, in run
backend-1   |     files_data = self.fetch_all_files()
backend-1   |   File "/usr/local/lib/python3.8/site-packages/decorator.py", line 232, in fun
backend-1   |     return caller(func, *(extras + args), **kw)
backend-1   |   File "/usr/local/lib/python3.8/site-packages/retry/api.py", line 73, in retry_decorator
backend-1   |     return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter,
backend-1   |   File "/usr/local/lib/python3.8/site-packages/retry/api.py", line 33, in __retry_internal
backend-1   |     return f()
backend-1   |   File "RepoToText.py", line 65, in fetch_all_files
backend-1   |     repo = github_instance.get_repo(self.repo_name)
backend-1   |   File "/usr/local/lib/python3.8/site-packages/github/MainClass.py", line 427, in get_repo
backend-1   |     headers, data = self.__requester.requestJsonAndCheck("GET", url)
backend-1   |   File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 537, in requestJsonAndCheck
backend-1   |     return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
backend-1   |   File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 598, in __check
backend-1   |     raise self.createException(status, responseHeaders, data)
backend-1   | github.GithubException.UnknownObjectException: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest"}
backend-1   | 192.168.65.1 - - [13/Mar/2024 23:57:09] "POST /scrape HTTP/1.1" 500 -

EDIT: I tried running it with the https "git" link as well, but got the error below. This time I used: https://github.com/smart-on-fhir/client-py.git

backend-1   | Traceback (most recent call last):
backend-1   |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1463, in wsgi_app
backend-1   |     response = self.full_dispatch_request()
backend-1   |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 872, in full_dispatch_request
backend-1   |     rv = self.handle_user_exception(e)
backend-1   |   File "/usr/local/lib/python3.8/site-packages/flask_cors/extension.py", line 176, in wrapped_function
backend-1   |     return cors_after_request(app.make_response(f(*args, **kwargs)))
backend-1   |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 870, in full_dispatch_request
backend-1   |     rv = self.dispatch_request()
backend-1   |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 855, in dispatch_request
backend-1   |     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
backend-1   |   File "RepoToText.py", line 133, in scrape
backend-1   |     filename = scraper.run()
backend-1   |   File "RepoToText.py", line 107, in run
backend-1   |     files_data = self.fetch_all_files()
backend-1   |   File "/usr/local/lib/python3.8/site-packages/decorator.py", line 232, in fun
backend-1   |     return caller(func, *(extras + args), **kw)
backend-1   |   File "/usr/local/lib/python3.8/site-packages/retry/api.py", line 73, in retry_decorator
backend-1   |     return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter,
backend-1   |   File "/usr/local/lib/python3.8/site-packages/retry/api.py", line 33, in __retry_internal
backend-1   |     return f()
backend-1   |   File "RepoToText.py", line 65, in fetch_all_files
backend-1   |     repo = github_instance.get_repo(self.repo_name)
backend-1   |   File "/usr/local/lib/python3.8/site-packages/github/MainClass.py", line 427, in get_repo
backend-1   |     headers, data = self.__requester.requestJsonAndCheck("GET", url)
backend-1   |   File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 537, in requestJsonAndCheck
backend-1   |     return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
backend-1   |   File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 598, in __check
backend-1   |     raise self.createException(status, responseHeaders, data)
backend-1   | github.GithubException.UnknownObjectException: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/repos/repos#get-a-repository"}

@spookyuser
Copy link

spookyuser commented Mar 14, 2024

One possible reason might be the port 5000 weirdness on macos e.g dotnet/aspnetcore#48932

But yeah also didn't work for me on mac, i was using codespaces though soo maybe that was why

@JeremiahPetersen
Copy link
Owner

thank you for sharing data on this. it seems it may be a mac specific issue. i will leave this issue raised while i continue researching a solution.

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

4 participants