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

No such file or directory: '~/.config/httpie/version_info.json' #1388

Closed
2 tasks done
nico-arianto opened this issue May 6, 2022 · 3 comments · Fixed by #1389
Closed
2 tasks done

No such file or directory: '~/.config/httpie/version_info.json' #1388

nico-arianto opened this issue May 6, 2022 · 3 comments · Fixed by #1389
Labels
bug Something isn't working new Needs triage. Comments are welcome!

Comments

@nico-arianto
Copy link

nico-arianto commented May 6, 2022

Checklist

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

Minimal reproduction code and steps

  1. do use http command, e.g. http GET http://localhost:8004/consumers/test

Current result

❯ http GET http://localhost:8004/consumers/test
HTTP/1.1 200 
Connection: keep-alive
Content-Length: 0
Date: Fri, 06 May 2022 06:28:00 GMT
Keep-Alive: timeout=60
X-B3-TraceId: baf0d94787afeb82




~ on ☁️  (ap-southeast-1) 
❯ Traceback (most recent call last):
  File "/opt/homebrew/Cellar/httpie/3.2.0/libexec/lib/python3.10/site-packages/httpie/__main__.py", line 19, in <module>
    sys.exit(main())
  File "/opt/homebrew/Cellar/httpie/3.2.0/libexec/lib/python3.10/site-packages/httpie/__main__.py", line 9, in main
    exit_status = main()
  File "/opt/homebrew/Cellar/httpie/3.2.0/libexec/lib/python3.10/site-packages/httpie/core.py", line 162, in main
    return raw_main(
  File "/opt/homebrew/Cellar/httpie/3.2.0/libexec/lib/python3.10/site-packages/httpie/core.py", line 44, in raw_main
    return run_daemon_task(env, args)
  File "/opt/homebrew/Cellar/httpie/3.2.0/libexec/lib/python3.10/site-packages/httpie/internal/daemon_runner.py", line 47, in run_daemon_task
    DAEMONIZED_TASKS[options.task_id](env)
  File "/opt/homebrew/Cellar/httpie/3.2.0/libexec/lib/python3.10/site-packages/httpie/internal/update_warnings.py", line 51, in _fetch_updates
    with open_with_lockfile(file, 'w') as stream:
  File "/opt/homebrew/Cellar/python@3.10/3.10.4/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/opt/homebrew/Cellar/httpie/3.2.0/libexec/lib/python3.10/site-packages/httpie/utils.py", line 287, in open_with_lockfile
    with open(file, *args, **kwargs) as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/na/.config/httpie/version_info.json'

Expected result

❯ http GET http://localhost:8004/consumers/test
HTTP/1.1 200 
Connection: keep-alive
Content-Length: 0
Date: Fri, 06 May 2022 06:28:00 GMT
Keep-Alive: timeout=60
X-B3-TraceId: baf0d94787afeb82

(without the FileNotFoundError)


Debug output

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

❯ http --debug GET http://localhost:8004/consumers/test
HTTPie 3.2.0
Requests 2.27.1
Pygments 2.12.0
Python 3.10.4 (main, Apr 26 2022, 19:36:29) [Clang 13.1.6 (clang-1316.0.21.2)]
/opt/homebrew/Cellar/httpie/3.2.0/libexec/bin/python3.10
Darwin 21.4.0

<Environment {'apply_warnings_filter': <function Environment.apply_warnings_filter at 0x104179d80>,
 'args': Namespace(),
 'as_silent': <function Environment.as_silent at 0x104179c60>,
 'colors': 256,
 'config': {'default_options': []},
 'config_dir': PosixPath('/Users/nico.arianto/.config/httpie'),
 'devnull': <property object at 0x104153b00>,
 'is_windows': False,
 'log_error': <function Environment.log_error at 0x104179cf0>,
 'program_name': 'http',
 'quiet': 0,
 'rich_console': <functools.cached_property object at 0x104169570>,
 'rich_error_console': <functools.cached_property object at 0x10416b0a0>,
 'show_displays': True,
 'stderr': <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>,
 'stderr_isatty': True,
 'stdin': <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>,
 'stdin_encoding': 'utf-8',
 'stdin_isatty': True,
 'stdout': <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>,
 'stdout_encoding': 'utf-8',
 'stdout_isatty': True}>

<PluginManager {'adapters': [],
 'auth': [<class 'httpie.plugins.builtin.BasicAuthPlugin'>,
          <class 'httpie.plugins.builtin.DigestAuthPlugin'>,
          <class 'httpie.plugins.builtin.BearerAuthPlugin'>],
 'converters': [],
 'formatters': [<class 'httpie.output.formatters.headers.HeadersFormatter'>,
                <class 'httpie.output.formatters.json.JSONFormatter'>,
                <class 'httpie.output.formatters.xml.XMLFormatter'>,
                <class 'httpie.output.formatters.colors.ColorFormatter'>]}>

>>> requests.request(**{'auth': None,
 'data': RequestJSONDataDict(),
 'headers': <HTTPHeadersDict('User-Agent': b'HTTPie/3.2.0')>,
 'method': 'get',
 'params': <generator object MultiValueOrderedDict.items at 0x104483220>,
 'url': 'http://localhost:8004/consumers/test'})

HTTP/1.1 200 
Connection: keep-alive
Content-Length: 0
Date: Fri, 06 May 2022 06:37:17 GMT
Keep-Alive: timeout=60
X-B3-TraceId: 5c2a368fd5b3f98a




~ on ☁️  (ap-southeast-1) 
❯ Traceback (most recent call last):
  File "/opt/homebrew/Cellar/httpie/3.2.0/libexec/lib/python3.10/site-packages/httpie/__main__.py", line 19, in <module>
    sys.exit(main())
  File "/opt/homebrew/Cellar/httpie/3.2.0/libexec/lib/python3.10/site-packages/httpie/__main__.py", line 9, in main
    exit_status = main()
  File "/opt/homebrew/Cellar/httpie/3.2.0/libexec/lib/python3.10/site-packages/httpie/core.py", line 162, in main
    return raw_main(
  File "/opt/homebrew/Cellar/httpie/3.2.0/libexec/lib/python3.10/site-packages/httpie/core.py", line 44, in raw_main
    return run_daemon_task(env, args)
  File "/opt/homebrew/Cellar/httpie/3.2.0/libexec/lib/python3.10/site-packages/httpie/internal/daemon_runner.py", line 47, in run_daemon_task
    DAEMONIZED_TASKS[options.task_id](env)
  File "/opt/homebrew/Cellar/httpie/3.2.0/libexec/lib/python3.10/site-packages/httpie/internal/update_warnings.py", line 51, in _fetch_updates
    with open_with_lockfile(file, 'w') as stream:
  File "/opt/homebrew/Cellar/python@3.10/3.10.4/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/opt/homebrew/Cellar/httpie/3.2.0/libexec/lib/python3.10/site-packages/httpie/utils.py", line 287, in open_with_lockfile
    with open(file, *args, **kwargs) as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/nico.arianto/.config/httpie/version_info.json'

Additional information, screenshots, or code examples

Installation via homebrew

@nico-arianto nico-arianto added bug Something isn't working new Needs triage. Comments are welcome! labels May 6, 2022
@isidentical
Copy link
Contributor

Thanks for the report @nico-arianto, I've just release 3.2.1 with it. You can upgrade, and hopefully this would be resolved.

@nico-arianto
Copy link
Author

@isidentical 👍🏼 Thanks for the quick fix, will try again after the 3.2.1 is available in the homebrew

@nico-arianto
Copy link
Author

nico-arianto commented May 7, 2022

Fyi, tested and verified it fixed now.

Thanks again

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

Successfully merging a pull request may close this issue.

2 participants