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

OSError when running django-admin in cpython@3.12.x toolchain #1372

Open
dgavrilov opened this issue Sep 8, 2024 · 0 comments
Open

OSError when running django-admin in cpython@3.12.x toolchain #1372

dgavrilov opened this issue Sep 8, 2024 · 0 comments

Comments

@dgavrilov
Copy link

Steps to Reproduce

> rye init --script --py 3.12 --no-readme --private --no-import --virtual
> rye sync
> rye add django
> rye run django-admin startproject newproject

Expected Result

This error is observed only in cpython@3.12.x. It is not observed in cpython@3.11.x.

Actual Result

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "D:\Projects\django-test\.venv\Scripts\django-admin.exe\__main__.py", line 8, in <module>
  File "D:\Projects\django-test\.venv\Lib\site-packages\django\core\management\__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "D:\Projects\django-test\.venv\Lib\site-packages\django\core\management\__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "D:\Projects\django-test\.venv\Lib\site-packages\django\core\management\base.py", line 413, in run_from_argv
    self.execute(*args, **cmd_options)
  File "D:\Projects\django-test\.venv\Lib\site-packages\django\core\management\base.py", line 459, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Projects\django-test\.venv\Lib\site-packages\django\core\management\commands\startproject.py", line 21, in handle
    super().handle("project", project_name, target, **options)
  File "D:\Projects\django-test\.venv\Lib\site-packages\django\core\management\templates.py", line 232, in handle
    run_formatters([top_dir], **formatter_paths)
  File "D:\Projects\django-test\.venv\Lib\site-packages\django\core\management\utils.py", line 172, in run_formatters
    subprocess.run(
  File "C:\Users\dgavrilov\.rye\py\cpython@3.12.5\Lib\subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\dgavrilov\.rye\py\cpython@3.12.5\Lib\subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\dgavrilov\.rye\py\cpython@3.12.5\Lib\subprocess.py", line 1538, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 193] %1 is not a valid Win32 application

Version Info

rye 0.39.0
commit: 0.39.0 (bf3ccf818 2024-08-21)
platform: windows (x86_64)
self-python: cpython@3.12.3
symlink support: true
uv enabled: true

Stacktrace

No response

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

1 participant