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

grip mode error: Internal server error #174

Closed
atanasj opened this issue Feb 27, 2020 · 6 comments
Closed

grip mode error: Internal server error #174

atanasj opened this issue Feb 27, 2020 · 6 comments
Labels

Comments

@atanasj
Copy link

atanasj commented Feb 27, 2020

This does not seem to be working. I get the following error:

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

I am running this on a markdown file, and can open with grip via cli.

I am using Grip 4.5.2. Am I missing something?

@seagle0128
Copy link
Owner

M-x list-processes, and find grip-xxx process if it exists, then check the logs in the *grip-xxx* buffer.

@atanasj
Copy link
Author

atanasj commented Feb 28, 2020

Okay, so this is what I found in the log:

 * Using credentials: atanasj^forge
 * Serving Flask app "grip.app" (lazy loading)
 * Environment: production
�[31m   WARNING: This is a development server. Do not use it in a production deployment.�[0m
�[2m   Use a production WSGI server instead.�[0m
 * Debug mode: off
 * Running on http://localhost:27115/ (Press CTRL+C to quit)
[2020-02-29 00:36:36,300] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.7/site-packages/grip/app.py", line 174, in _render_page
    content = self.renderer.render(text, self.auth)
  File "/usr/local/lib/python3.7/site-packages/grip/renderers.py", line 78, in render
    r.raise_for_status()
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.github.com/markdown/raw
127.0.0.1 - - [29/Feb/2020 00:36:36] "�[35m�[1mGET / HTTP/1.1�[0m" 500 -
127.0.0.1 - - [29/Feb/2020 00:36:36] "�[33mGET /favicon.ico HTTP/1.1�[0m" 404 -

The output looks weird, so here's a screenshot too:

image

Any ideas? Also, I had this in the M-x list-processes:

grip --user=atanasj^forge --pass=xxxxxxx --title=README.md - Grip /var/folders/77/7ht3td2j1vb00csyp1l4wlv40000gn/T/README.mdjpjBsq.tmp 27115

I've been having troubles setting up forge, could this be related?

@seagle0128
Copy link
Owner

I think it's related. The credentials is invalid, so grip cannot access the api correctly.
Set grip-github-user (username) and grip-github-password (token) and retry.

@atanasj
Copy link
Author

atanasj commented Feb 28, 2020

Where do I set it?

@atanasj
Copy link
Author

atanasj commented Feb 28, 2020

As in (setq?

@seagle0128
Copy link
Owner

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

No branches or pull requests

2 participants