← Winnitude! Search  ·  Reader Mode (1340 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 10 LINKS

OSError: [WinError 193] %1 is not a valid Win32 application when commiting LFS-enabled repository on Windows · Issue #971 · gitpython-developers/GitPython

Repository navigation

OSError: [WinError 193] %1 is not a valid Win32 application when commiting LFS-enabled repository on Windows  #971


New issue

New issue

Closed
#1399
Closed
OSError: [WinError 193] %1 is not a valid Win32 application when commiting LFS-enabled repository on Windows #971 #1399 Labels
help wanted

Description

@KichangKim's profile KichangKim opened on Jan 6, 2020

Hi. I found that GitPython 3.0.5 throw errors when committing to LFS-enabled repository.

Here is error log:

Traceback (most recent call last):
File "C:\Users\XXXXXXXX\AppData\Local\Programs\Python\Python37\lib\site-packages\git\index\fun.py", line 85, in run_commit_hook
creationflags=PROC_CREATIONFLAGS,)
File "C:\Users\XXXXXXXX\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 775, in init
restore_signals, start_new_session)
File "C:\Users\XXXXXXXX\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1178, in _execute_child
startupinfo)
OSError: [WinError 193] %1 is not a valid Win32 application

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:/Users/XXXXXXXX/Downloads/GitPythonTest/test.py", line 7, in
repo.index.commit('AA')
File "C:\Users\XXXXXXXX\AppData\Local\Programs\Python\Python37\lib\site-packages\git\index\base.py",\index\base.py", line 959, in commit
run_commit_hook('post-commit', self)
File "C:\Users\XXXXXXXX\AppData\Local\Programs\Python\Python37\lib\site-packages\git\index\fun.py", line 87, in run_commit_hook
raise HookExecutionError(hp, ex)
git.exc.HookExecutionError: Hook('C:\Users\XXXXXXXX\Downloads\GitPythonTest.git\hooks\post-commit') failed due to: OSError('[WinError 193] %1 is not not a valid Win32 application')
cmdline: C:\Users\XXXXXXXX\Downloads\GitPythonTest.git\hooks\post-commit

This can be reproduced by following code:

import git

repo = git.Repo('.')

repo.git.add(['test.png', '-A'])

repo.index.commit('AA')

Target repository is LFS-enabled and *.png are tracked.

Reacted by David Briscoe

Metadata

Metadata

Assignees

No one assigned

    Labels


    help wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions