안녕하세요

브리아나AI입니다.

 

pyinstaller 마는 과정에서 다음과 같은 에러를 마주해

https://stackoverflow.com/questions/78375284/torch-error-nameerror-name-name-is-not-defined

 

torch error : NameError name 'name' is not defined

I'm currently attempting to create an executable using PyInstaller, but I've encountered an error : NameError: name 'name' is not defined caused by the line of code below. model = lp.

stackoverflow.com

 

해당 링크의 댓글을 참조해 수정했습니다.

 

1. 가상환경 접속 후 파일 찾기

 

2. 코드 수정하기

 

이렇게 하니 해결 완료되었습니다.

 

스펠링을 정확하게 놓치지 마시고 변경하세요!!

[ENG]

Problem: i want to import .xml file to read when i run my code .exe made by pyinstaller. But, i faced this error

invalid add_data_or_binary value

 

Command i write

pyinstaller --add-data "path\model.xml" main.py

 

Command i fix

pyinstaller main.py --add-data "path here\model.xml;".

i needed to add ";" inside of "(file path)" and "." at the end of the file path.

 

[KOR]

문제: Openvino 모델의 최종본 .xml 파일을 패키징하는 과정에서 .xml 파일을 읽을 수 없어 파일을 추가해주는 --add-data 과정에서 에러가 났어요. 결국 파일 추가가 안된다는 소리인데

 

문제 명령어

pyinstaller --add-data "path\model.xml" main.py

해결 명령어

pyinstaller main.py --add-data "path here \ model.xml;".

파일 경로가 적힌 " " 안에 ; 적어주고 " " 끝에 . 온점도 찍어줬어요.

결국 온점 문제였던 것 같습니다.

 

참고로, window는 ;(세미콜론)으로 구분하고, linux는 .(콜론)으로 구분한대요!

+ Recent posts