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

Preparing metadata (pyproject.toml) did not run successfully #371

Open
todrobbins opened this issue May 6, 2024 · 2 comments
Open

Preparing metadata (pyproject.toml) did not run successfully #371

todrobbins opened this issue May 6, 2024 · 2 comments
Assignees

Comments

@todrobbins
Copy link
Member

Overview

Upon first launch of the macOS app, this error appears and then the app crashes/closes:

Error: Command failed: /Users/trobbins/.opendataeditor/python/bin/python3 -m pip install --upgrade --disable-pip-version-check fastapi==0.103.1 fastparquet==2023.8.0 frictionless-ckan-mapper==1.0.9 frictionless==5.16.0 gitignore-parser==0.1.6 ijson==3.2.3 jinja2==3.1.2 jsonlines==4.0.0 marko==2.0.0 openai==0.28.0 openpyxl==3.1.2 pandas==2.1.1 pydantic==2.3.0 pygithub==1.59.1 pyquery==2.0.0 python-multipart==0.0.6 pyzenodo3==1.0.2 sqlalchemy==2.0.20 tinydb==4.8.0 typer==0.9.0 typing_extensions==4.8.0 uvicorn==0.23.2 xlrd==2.0.1 xlwt==1.3.0
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [67 lines of output]
WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
Traceback (most recent call last):
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 36, in read_pyproject
section = defn.get("tool", {})[tool_name]
KeyError: 'setuptools_scm'
running dist_info
creating /private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-modern-metadata-fv5t2ui6/petl.egg-info
writing /private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-modern-metadata-fv5t2ui6/petl.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-modern-metadata-fv5t2ui6/petl.egg-info/dependency_links.txt
writing requirements to /private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-modern-metadata-fv5t2ui6/petl.egg-info/requires.txt
writing top-level names to /private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-modern-metadata-fv5t2ui6/petl.egg-info/top_level.txt
writing manifest file '/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-modern-metadata-fv5t2ui6/petl.egg-info/SOURCES.txt'
Traceback (most recent call last):
File "/Users/trobbins/.opendataeditor/python/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/Users/trobbins/.opendataeditor/python/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/trobbins/.opendataeditor/python/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 366, in prepare_metadata_for_build_wheel
self.run_setup()
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 5, in <module>
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 104, in setup
return distutils.core.setup(**attrs)
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
return run_commands(dist)
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
dist.run_commands()
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools/command/dist_info.py", line 92, in run
self.egg_info.run()
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 321, in run
self.find_sources()
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 329, in find_sources
mm.run()
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 550, in run
self.add_defaults()
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 591, in add_defaults
rcfiles = list(walk_revctrl())
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools/command/sdist.py", line 16, in walk_revctrl
yield from ep.load()(dirname)
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools_scm/_file_finders/__init__.py", line 110, in find_files
res: list[str] = command(path)
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools_scm/_file_finders/git.py", line 93, in git_find_files
toplevel = _git_toplevel(os.fspath(path))
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools_scm/_file_finders/git.py", line 23, in _git_toplevel
res = _run(["git", "rev-parse", "HEAD"], cwd=cwd)
File "/private/var/folders/zv/jtj1cly554q6x41q5m5brbm80000gn/T/pip-build-env-9hn8z36v/overlay/lib/python3.10/site-packages/setuptools_scm/_run_cmd.py", line 150, in run
res = subprocess.run(
File "/Users/trobbins/.opendataeditor/runner/lib/python3.10/subprocess.py", line 505, in run
stdout, stderr = process.communicate(input, timeout=timeout)
File "/Users/trobbins/.opendataeditor/runner/lib/python3.10/subprocess.py", line 1154, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "/Users/trobbins/.opendataeditor/runner/lib/python3.10/subprocess.py", line 2022, in _communicate
self._check_timeout(endtime, orig_timeout, stdout, stderr)
File "/Users/trobbins/.opendataeditor/runner/lib/python3.10/subprocess.py", line 1198, in _check_timeout
raise TimeoutExpired(
subprocess.TimeoutExpired: Command '['git', 'rev-parse', 'HEAD']' timed out after 40 seconds
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I I don't think this is related to #278 & #313, and thought I'd share it here for review.

@todrobbins
Copy link
Member Author

Just tried to launch it again to get a screen shot as well and it loaded just fine. 🤷🏻‍♂️😆

@roll
Copy link
Collaborator

roll commented May 7, 2024

Thanks @todrobbins!

@pdelboca
Based on the log info the internet (somewhere) went down for 40 second causing pip to crash. So it's not a bug on our electron component but a bug on error handling (#295) and retries strategy

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

No branches or pull requests

3 participants