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 with virtualenv #180

Closed
Katsuya-Tomioka opened this issue Jun 23, 2016 · 8 comments
Closed

grip with virtualenv #180

Katsuya-Tomioka opened this issue Jun 23, 2016 · 8 comments

Comments

@Katsuya-Tomioka
Copy link

I'm trying to use grip with virtualenv on Mac and Linux with python 2.7. In both cases, grip seems to get stuck somehow. Command line "grip --export" or API (grip.main) doesn't seem to make any difference. Any suggestion?

@JasonYao
Copy link

@Katsuya-Tomioka
Can you clarify what you mean when you say

grip seems to get stuck somehow

Also, when you say

Command line "grip --export" or API (grip.main) doesn't seem to make any difference.

Do you mean to say that using the command generates an HTML file that appears to be incorrectly formatted for you, or that an HTML file is not generated at all, or that the command simply makes your computer hang, etc.

I'm running on osx 10.11.5 with the latest grip installed and working in two separate virtualenvs via homebrew's pyenv with the pyenv-virtualenv plugin. Grip appears to be working in both 2.7.11 and 3.5.1 for me, so it may be a possible issue during your installation?

@Katsuya-Tomioka
Copy link
Author

No html is written at all. I can't kill it with ctrl-c either. Looking at
trace, the flask app seems to be waiting for input.

I'm osx 10.11.5, and python 2.7.9.

centos6 and python 2.6.6 has the same issue.

On Sun, Jun 26, 2016 at 4:20 AM, Jason notifications@github.com wrote:

@Katsuya-Tomioka https://github.com/Katsuya-Tomioka
Can you clarify what you mean when you say

grip seems to get stuck somehow

Also, when you say

Command line "grip --export" or API (grip.main) doesn't seem to make any
difference.

Do you mean to say that using the command generates an HTML file that
appears to be incorrectly formatted for you, or that an HTML file is not
generated at all, or that the command simply makes your computer hang, etc.

I'm running on osx 10.11.5 with the latest grip installed and working in
two separate virtualenvs via homebrew's pyenv
https://github.com/yyuu/pyenv with the pyenv-virtualenv
https://github.com/yyuu/pyenv-virtualenv plugin. Grip appears to be
working in both 2.7.11 and 3.5.1 for me, so it may be a possible issue
during your installation?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#180 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AFEdRv7_pnhiQ-G0KiZlRTuzmehwqXx_ks5qPjZmgaJpZM4I9Pro
.

@JasonYao
Copy link

So I'm testing the two python versions you listed, both 2.7.9 and 2.6.6.

Replication Steps

# Installs testing envs
pyenv install 2.7.9
pyenv install 2.6.6
pyenv virtualenv 2.7.9 grip-test-2.7.9
pyenv virtualenv 2.6.6 grip-test-2.6.6

## Tests (we use the grip README.md for testing)
wget https://raw.githubusercontent.com/yyuu/pyenv-virtualenv/master/README.md -O test.md
pyenv global grip-test-2.7.9
pip install grip
grip test.md

pyenv global grip-test-2.6.6
pip install grip
grip test.md

Results

Both envs worked perfectly fine, and the result could be seen at http://localhost:6419/. Since fresh clean installs appear to be working, I'd just recommend cleaning your system, and re-installing the envs and grip again.

If you don't want to do that, and prefer to just debug the current issues, can you paste which dependencies you have installed? You can do that with a pip freeze command, and try and see if there are any outdated dependencies that you could update if that's a possible issue.

Working grip depencies

2.7.9

click==6.6
docopt==0.6.2
Flask==0.11.1
grip==4.2.0
itsdangerous==0.24
Jinja2==2.8
Markdown==2.6.6
MarkupSafe==0.23
path-and-address==1.1.0
Pygments==2.1.3
requests==2.10.0
Werkzeug==0.11.10

2.6.6

argparse==1.4.0
click==6.6
docopt==0.6.2
Flask==0.11.1
grip==4.2.0
itsdangerous==0.24
Jinja2==2.8
Markdown==2.6.6
MarkupSafe==0.23
path-and-address==1.1.0
Pygments==2.1.3
requests==2.10.0
Werkzeug==0.11.10

2 6 6 grip test
2 7 9 grip test

@Katsuya-Tomioka
Copy link
Author

Looks like I have the same dependencies. Does "--export" work in your test?

@JasonYao
Copy link

Hmm looks like there's an issue with the --export command - I'm getting a hang just like you are, and it can't be killed with a CTRL + C

Reproduction steps

wget https://raw.githubusercontent.com/yyuu/pyenv-virtualenv/master/README.md -O test.md

# Tests virtualenvs 2.6.6, 2.7.9, 2.7.11, 3.5.1
pyenv global grip-test-2.6.6
grip --export test.md

pyenv global grip-test-2.7.9
grip --export test.md

pyenv global grip-test-3.5.1
grip --export test.md

pyenv global grip-test-2.7.11
grip --export test.md

# Tests full python versions
pyenv global 2.7.11
grip --export test.md

pyenv global 3.5.1
grip --export test.md

Results

# For all versions running the --export command
Exporting to test.html
# Blank line and a deadlock

In all cases, just using grip test.md worked perfectly, and managed to be displayed fine. However, it looks like the --export command is messed up, and causes it to hang waiting for input.

I'd recommend just using the normal grip filename.md command for now until this is fixed.

@joeyespo
Copy link
Owner

joeyespo commented Jul 1, 2016

Fixed with #184.

Thanks for getting the conversation going, @Katsuya-Tomioka, and for digging much deeper, @JasonYao! I'll create a new release with the fix shortly.

@joeyespo joeyespo closed this as completed Jul 1, 2016
@Katsuya-Tomioka
Copy link
Author

Master works great. (python 2.7.9 on mac 10.11.5 and python 2.6.6 on centos6) Thanks for your help.

@joeyespo
Copy link
Owner

v4.3.0 was just published. Run pip install --upgrade grip to get the fix without running off master.

Thanks for being patient in the meantime 😃

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

3 participants