[python 일반] *win32ctypes.pywin32.pywintypes.error when using pyinstaller in VS Code - Possible Virus/Trojan?

I am using pyinstaller to generate an executable code for my python.py file. However, I am getting this error:

File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\PyInstaller\utils\win32\icon.py", line 143, in CopyIcons_FromIco
    hdst = win32api.BeginUpdateResource(dstpath, 0)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\win32ctypes\pywin32\win32api.py", line 208, in BeginUpdateResource
    with _pywin32error():
  File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
  File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\win32ctypes\pywin32\pywintypes.py", line 37, in pywin32error
    raise error(exception.winerror, exception.function, exception.strerror)
**win32ctypes.pywin32.pywintypes.error: (225, 'BeginUpdateResourceW', 'Operation did not complete successfully because the file contains a virus or potentially unwanted software.')**

My antivirus is allegating there is a virus when running pyinstaller: Trojan:Win64/Malgent!MSR

I tried to uninstall python, reinstall, and nothing

 

 

 

 

I had a similar issue today when using the latest pyinstaller (6.X.X) on Windows 11. For me, changing to an older release (5.13.2) fixed the issue.

To install 5.13.2 you can use pip module with following:

pip install pyinstaller==5.13.2

 

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

 

 

[출처] https://stackoverflow.com/questions/77239487/win32ctypes-pywin32-pywintypes-error-when-using-pyinstaller-in-vs-code-possib

 

 

 

 

 

 

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
537 [Python 수학] Plotting With PyQtGraph 졸리운_곰 2024.06.07 558
536 [Python 인터넷] python-screenshot-to-FTP /screengrab.py 졸리운_곰 2024.06.07 389
535 [python 일반] [Python] strftime과 strptime file 졸리운_곰 2024.06.07 377
534 [Python 인터넷] IP 주소를 찾는 Python 프로그램 file 졸리운_곰 2024.06.07 365
533 [python 일반] How to Run a Periodic Background Task in Python 졸리운_곰 2024.06.07 324
» [python 일반] *win32ctypes.pywin32.pywintypes.error when using pyinstaller in VS Code - Possible Virus/Trojan? 졸리운_곰 2024.06.07 453
531 [Python 수학] 그래프 라이브러리 PyQtGraph 2D Graph 예제 코드 file 졸리운_곰 2024.06.06 498
530 [python 수학] [PYTHON] bar 그래프에 백분율 표시하기 file 졸리운_곰 2024.06.06 721
529 [PyQT5] PyQt5 Mainwindow에 Qt Designer를 사용한 graph Widget 추가 file 졸리운_곰 2024.06.06 476
528 [PyQT5] [Python with Pyqt5] Widget에다가 그래프 넣기 (Feat. Matplotlib) file 졸리운_곰 2024.06.06 437
527 [PyQT5] 파이썬(Python)PyQt5 - QMessageBox 사용하기 file 졸리운_곰 2024.06.06 455
526 [PyQT5] UI Designer 에서 Tab Widget 생성 하기 file 졸리운_곰 2024.06.06 420
525 [PyQT5] UI Designer 에서 리사이즈 시 같이 확장하기 file 졸리운_곰 2024.06.06 537
524 [PyQT5] UI Designer 에서 Grid Layout 배치 해보기 file 졸리운_곰 2024.06.06 474
523 [pyQT] 「Python : PyQt5」 Qt Designer : .ui → .py 변환 file 졸리운_곰 2024.06.05 623
522 [pyQT] Dev/python/ [pyqt5] 프로그램창을 항상 가장 위에 있게 하면서 동시에 타이틀 바도 없게 하려면? file 졸리운_곰 2024.06.01 542
521 [python 일반] 【Python】The 'pathlib' package is an obsolete backport of a standard library ・・・ 졸리운_곰 2024.05.30 318
520 [python 데이터분석] Keeping Anaconda Up To Date 졸리운_곰 2024.05.30 552
519 [Python 일반] 파이썬 exe 파일 만들기 졸리운_곰 2024.05.30 307
518 [pyQT] QtDesigner에서 리소스 편집기 사용하기 file 졸리운_곰 2024.05.28 499
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED