IUrreta / DatabaseEditor

Database Editor for F1 Manager 2024 and 2023
GNU General Public License v3.0
90 stars 31 forks source link

Preparing metadata (pyproject.toml) did not run successfully [BUG] #382

Closed Synthesized closed 1 month ago

Synthesized commented 1 month ago

Describe the bug I am unable to completely start the editor and get the "Could not connect with backend" error.. I'm getting the 'ModuleNotFoundError: No module named 'websockets'' line, but the preceding lines are different from those listed on the troubleshooting guide. I have removed and reinstalled NodeJS, Python, and git, but had no change. Have confirmed pip is installed, running 24.2.

To Reproduce Steps to reproduce the behavior:

  1. Open run.bat

Expected behavior Editor to run normally.

Save file and log.txt Console error lines:

Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [45 lines of output] Partial import of sklearn during the build process. Traceback (most recent call last): File "C:\FMMangerEditor\DatabaseEditor\back\DBEditor\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main()


        File "C:\FMMangerEditor\DatabaseEditor\back\DBEditor\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\FMMangerEditor\DatabaseEditor\back\DBEditor\Lib\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 "C:\Users\Synth\AppData\Local\Temp\pip-build-env-q4z1u0rt\overlay\Lib\site-packages\setuptools\build_meta.py", line 373, in prepare_metadata_for_build_wheel
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "C:\Users\Synth\AppData\Local\Temp\pip-build-env-q4z1u0rt\overlay\Lib\site-packages\setuptools\build_meta.py", line 503, in run_setup
          super().run_setup(setup_script=setup_script)
          ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Synth\AppData\Local\Temp\pip-build-env-q4z1u0rt\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
          exec(code, locals())
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 633, in <module>
        File "<string>", line 627, in setup_package
        File "<string>", line 554, in configure_extension_modules
        File "C:\Users\Synth\AppData\Local\Temp\pip-install-t10rxtfc\scikit-learn_042c6c763ed5425080e3742eb562fd89\sklearn\_build_utils\__init__.py", line 46, in cythonize_extensions
          basic_check_build()
          ~~~~~~~~~~~~~~~~~^^
        File "C:\Users\Synth\AppData\Local\Temp\pip-install-t10rxtfc\scikit-learn_042c6c763ed5425080e3742eb562fd89\sklearn\_build_utils\pre_build_helpers.py", line 73, in basic_check_build
          compile_test_program(code)
          ~~~~~~~~~~~~~~~~~~~~^^^^^^
        File "C:\Users\Synth\AppData\Local\Temp\pip-install-t10rxtfc\scikit-learn_042c6c763ed5425080e3742eb562fd89\sklearn\_build_utils\pre_build_helpers.py", line 31, in compile_test_program
          ccompiler.compile(
          ~~~~~~~~~~~~~~~~~^
              ["test_program.c"], output_dir="objects", extra_postargs=extra_postargs
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          )
          ^
        File "C:\Users\Synth\AppData\Local\Temp\pip-build-env-q4z1u0rt\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 379, in compile
          self.initialize()
          ~~~~~~~~~~~~~~~^^
        File "C:\Users\Synth\AppData\Local\Temp\pip-build-env-q4z1u0rt\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 289, in initialize
          vc_env = _get_vc_env(plat_spec)
        File "C:\Users\Synth\AppData\Local\Temp\pip-build-env-q4z1u0rt\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 150, in _get_vc_env
          raise DistutilsPlatformError(
          ...<3 lines>...
          )
      distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [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.
Traceback (most recent call last):
  File "C:\FMMangerEditor\DatabaseEditor\back\back.py", line 2, in <module>
    import websockets
ModuleNotFoundError: No module named 'websockets'

**Additional context**
It mentions requiring Visual C++ 14.0 or greater installed, but I have 14.40.33816 installed.  I am running Windows 11 Home.  I apologize if I've missed something very basic.  Appreciate any assistance you can provide.  Thank you!
geoffp89 commented 1 month ago

Same issue. Windows 10 Pro laptop that is not my gaming rig but thought I'd install and look at my saved game files. Error log similar to OPs is attached. I also have Visual C++ updated.

The 'where python' at the command prompt returns the .exe's correct path. Version = 3.13.0

ErrLogPrepMetaDat2024-10-16.txt

FindusEFS commented 1 month ago

I have that exact same issue. This has worked before with this exact location as well but before I reset my laptop a few months ago. Now it never works.

Here is what it says for me:

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [45 lines of output] Partial import of sklearn during the build process. Traceback (most recent call last): File "C:\Users\samue\AppData\Local\F1Manager24\Saved\SaveGames\back\DBEditor\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main()


        File "C:\Users\samue\AppData\Local\F1Manager24\Saved\SaveGames\back\DBEditor\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\samue\AppData\Local\F1Manager24\Saved\SaveGames\back\DBEditor\Lib\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 "C:\Users\samue\AppData\Local\Temp\pip-build-env-pobm07nz\overlay\Lib\site-packages\setuptools\build_meta.py", line 373, in prepare_metadata_for_build_wheel
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "C:\Users\samue\AppData\Local\Temp\pip-build-env-pobm07nz\overlay\Lib\site-packages\setuptools\build_meta.py", line 516, in run_setup
          super().run_setup(setup_script=setup_script)
          ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\samue\AppData\Local\Temp\pip-build-env-pobm07nz\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
          exec(code, locals())
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 633, in <module>
        File "<string>", line 627, in setup_package
        File "<string>", line 554, in configure_extension_modules
        File "C:\Users\samue\AppData\Local\Temp\pip-install-8qzuoctm\scikit-learn_7039a2696b024879a1462def5eb9e343\sklearn\_build_utils\__init__.py", line 46, in cythonize_extensions
          basic_check_build()
          ~~~~~~~~~~~~~~~~~^^
        File "C:\Users\samue\AppData\Local\Temp\pip-install-8qzuoctm\scikit-learn_7039a2696b024879a1462def5eb9e343\sklearn\_build_utils\pre_build_helpers.py", line 73, in basic_check_build
          compile_test_program(code)
          ~~~~~~~~~~~~~~~~~~~~^^^^^^
        File "C:\Users\samue\AppData\Local\Temp\pip-install-8qzuoctm\scikit-learn_7039a2696b024879a1462def5eb9e343\sklearn\_build_utils\pre_build_helpers.py", line 31, in compile_test_program
          ccompiler.compile(
          ~~~~~~~~~~~~~~~~~^
              ["test_program.c"], output_dir="objects", extra_postargs=extra_postargs
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          )
          ^
        File "C:\Users\samue\AppData\Local\Temp\pip-build-env-pobm07nz\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 379, in compile
          self.initialize()
          ~~~~~~~~~~~~~~~^^
        File "C:\Users\samue\AppData\Local\Temp\pip-build-env-pobm07nz\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 289, in initialize
          vc_env = _get_vc_env(plat_spec)
        File "C:\Users\samue\AppData\Local\Temp\pip-build-env-pobm07nz\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 150, in _get_vc_env
          raise DistutilsPlatformError(
          ...<3 lines>...
          )
      distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [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.
Traceback (most recent call last):
  File "C:\Users\samue\AppData\Local\F1Manager24\Saved\SaveGames\back\back.py", line 2, in <module>
    import websockets
ModuleNotFoundError: No module named 'websockets'
IUrreta commented 1 month ago

I'm sorry buit this is an issue that I have had on my personal laptop with python and at work and have no idea how to get around with it. To be more precise, the: × Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

So I'm sorry if for now I can't help you :(

Synthesized commented 1 month ago

Appreciate you responding Urreta. Just happy to know I didn't do something dumb.

Since you mentioned you have seen the error as well I searched for it in google and found some comments that mentioned downgrading Python solved the issue. Figured it was worth a shot, installed 3.10.11 (and I needed to delete and redownload the editor as well since it was looking for the newer python directory), but the editor opened correctly, connected successfully, and seems to be working as intended. Haven't tested all of the functionality, but seems to be fine. I didn't test any higher Python versions to see exactly when the break occurs, but for right now 3.10.11 works.

geoffp89 commented 1 month ago

Will try rolling back and report in, thanks.

geoffp89 commented 1 month ago

Will try rolling back and report in, thanks.

Solved 3.10.11 installed. Deleted editor folder and re-installed. Seems to be working fine.

IUrreta commented 1 month ago

Great!

IUrreta commented 1 month ago

Just out of curiosity, what version of python were you using before?

Synthesized commented 1 month ago

Latest available on the website, 3.13.0.

geoffp89 commented 1 month ago

3.13.0 as well as 3.11