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

Does not work with a small easy peasy sample 'http -f requests.http' #1535

Open
ceecer1 opened this issue Oct 16, 2023 · 4 comments
Open

Does not work with a small easy peasy sample 'http -f requests.http' #1535

ceecer1 opened this issue Oct 16, 2023 · 4 comments
Labels
bug Something isn't working new Needs triage. Comments are welcome!

Comments

@ceecer1
Copy link

ceecer1 commented Oct 16, 2023

Checklist

  • [ X] I've searched for similar issues.
  • [ X] I'm using the latest version of HTTPie.

Minimal reproduction code and steps

  1. Create a .http file, e.g. file.http
  2. Try execute, http -f file.http

Current result

Traceback (most recent call last):
File "/opt/homebrew/bin/http", line 8, in
sys.exit(main())
^^^^^^
File "/opt/homebrew/Cellar/httpie/3.2.2_2/libexec/lib/python3.12/site-packages/httpie/main.py", line 8, in main
from httpie.core import main
File "/opt/homebrew/Cellar/httpie/3.2.2_2/libexec/lib/python3.12/site-packages/httpie/core.py", line 8, in
import requests
File "/opt/homebrew/Cellar/httpie/3.2.2_2/libexec/lib/python3.12/site-packages/requests/init.py", line 147, in
from . import packages, utils
File "/opt/homebrew/Cellar/httpie/3.2.2_2/libexec/lib/python3.12/site-packages/requests/utils.py", line 24, in
from . import certs
File "/opt/homebrew/Cellar/httpie/3.2.2_2/libexec/lib/python3.12/site-packages/requests/certs.py", line 14, in
from certifi import where
ModuleNotFoundError: No module named 'certifi'

Expected result

The current result is malfunction since 'certifi' module is there as well.


Debug output

Please re-run the command with --debug, then copy the entire command & output and paste both below:

$ http --debug -f product_requests.http
Traceback (most recent call last):
  File "/opt/homebrew/bin/http", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/Cellar/httpie/3.2.2_2/libexec/lib/python3.12/site-packages/httpie/__main__.py", line 8, in main
    from httpie.core import main
  File "/opt/homebrew/Cellar/httpie/3.2.2_2/libexec/lib/python3.12/site-packages/httpie/core.py", line 8, in <module>
    import requests
  File "/opt/homebrew/Cellar/httpie/3.2.2_2/libexec/lib/python3.12/site-packages/requests/__init__.py", line 147, in <module>
    from . import packages, utils
  File "/opt/homebrew/Cellar/httpie/3.2.2_2/libexec/lib/python3.12/site-packages/requests/utils.py", line 24, in <module>
    from . import certs
  File "/opt/homebrew/Cellar/httpie/3.2.2_2/libexec/lib/python3.12/site-packages/requests/certs.py", line 14, in <module>
    from certifi import where
ModuleNotFoundError: No module named 'certifi'

Additional information, screenshots, or code examples

@ceecer1 ceecer1 added bug Something isn't working new Needs triage. Comments are welcome! labels Oct 16, 2023
@aliktb
Copy link

aliktb commented Oct 16, 2023

yep, same issue here running a simple command as noted in the usage examples:

https httpie.io/hello

throws this error:

Traceback (most recent call last):
  File "/usr/local/bin/https", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/Cellar/httpie/3.2.2_2/libexec/lib/python3.12/site-packages/httpie/__main__.py", line 8, in main
    from httpie.core import main
  File "/usr/local/Cellar/httpie/3.2.2_2/libexec/lib/python3.12/site-packages/httpie/core.py", line 8, in <module>
    import requests
  File "/usr/local/Cellar/httpie/3.2.2_2/libexec/lib/python3.12/site-packages/requests/__init__.py", line 147, in <module>
    from . import packages, utils
  File "/usr/local/Cellar/httpie/3.2.2_2/libexec/lib/python3.12/site-packages/requests/utils.py", line 24, in <module>
    from . import certs
  File "/usr/local/Cellar/httpie/3.2.2_2/libexec/lib/python3.12/site-packages/requests/certs.py", line 14, in <module>
    from certifi import where
ModuleNotFoundError: No module named 'certifi'

Not sure if I'm doing anything wrong. Have installed it with brew install httpie but can't get anything other than this error

@BlakeGardner
Copy link

I have the same issue as the commenters above.

@julien-lesire
Copy link

This fixed it for me:
/opt/homebrew/Cellar/httpie/3.2.2_3/libexec/bin/python3 -m pip install setuptools Pygments certifi

@iloveitaly
Copy link

That fixed it for me as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new Needs triage. Comments are welcome!
Projects
None yet
Development

No branches or pull requests

5 participants