본문 바로가기

분류 전체보기

(112)
[ENAS만판다] - [Django] polls tutorial error - TypeError at /polls/4/vote/Value after * must be an iterable, not int return HttpResponseRedirect(reverse('polls:results', args=(question.id))) => return HttpResponseRedirect(reverse('polls:results', args=(question.id,)))
[ENAS만판다] - [Django] Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:admin/polls [name='index']polls <int:question_id>/ [name='detail']polls <int:question_id>/results/ [name='results']polls <int:question_id.. 이렇게 나오는 경우는, 자세히 보면, polls/index로 나와야하는데, 자세히 보면 슬래쉬가 없다... 그렇다. mysite의 urls.py 에서 자세히 보면 슬래쉬가 어플리케이션 단의 빠져있던 경우다... 바로 붙여주자. urlpatterns = [ path('admin/', admin.site.urls), path('polls', include('polls.urls')), ] 이걸 이렇게만 바꾸면 된다. 시간만 날렸다. urlpatterns = [ path('admin/', admin.site.urls), path('polls/', include('polls.urls')), ]
python으로 wifi(와이파이) 정보 가져오기 쓰는 사람이 있을지 모르겠다 개발한거 누군가 보라고 올린다. import os def get_wifi_list(): wifi_string = os.popen('iwlist scanning').read() wifi_string_list = wifi_string.split("Cell")[1:] print("Connect available wifi length : {}".format(len(wifi_string_list))) # get wifi infos wifi_dict_list = [] wifi_index = 0 for wifi_string in wifi_string_list : wifi_index += 1 # increase index wifi_string = wifi_string.replace(' ',..
Pyinstaller시 MMDeploy NotImplementedError: Unsupported backend type: tensorrt 오류 분명 python3로 실행하면 오류가 안나는데, pyinstaller로 빌드하면 저런 오류가 난다. 최대한 해결해보려고 했으나, 감을 못잡았고.. File "mmdeploy/codebase/base/backend_model.py", line 63, in _build_wrapper 여기에서 난다는 것을 보았다. 그래서 해당 backend_model.py에 들어갔으며, 항상 None으로 출력되는 줄 위에 import를 직접 시켜줘서 넣어줘야겠다고 생각했음. 하드하긴하지만 일단 해결은 봐야했기 때문에 기존 코드는 아마 _build_wrapper함수안에 이렇게 되어있을 것 from mmdeploy.backend.base import get_backend_manager backend_mgr = get_backen..
Could not find the matplotlib data files 오류 당시 나는 matplotlib 3.3을 사용중이었음 단순히 다운그레이드하여 해결함 3.1.3 또는 3.0.3 으로 해서 해결하였음 python3 -m pip install matplotlib==3.1.3
pyinstaller시, symbolic_opset 못찾는 오류 실제 torch.onnx.symbolic_opset7이 존재함에도 불구하고 못찾는 오류가 존재한다. 이 때는 미리 import 시켜주어서 해결하는 방법이 있다. 예를 들어서 import SOMETORCHMODEL이 있고, 여기서 에러가 뜬다면, from torch.onnx import symbolic_opset7 import SOMETORCHMODEL 이렇게 작성해주면 해결된다. 7말고도 8이 뜨면 해당 것들을 모두 미리 import 시켜주면 된다.
__main__.PyInstallerImportError: Failed to load dynlib/dll '/home/~~~~~~/libtorch_global_deps.so'. Most probably this dynlib/dll was not found when the application was frozen. 오류 pyinstaller할 때, dll 로드를 못했다는 소리 실제로 저 경로에 가보면 존재하지도 않는다. 내가 찾은 방법은 해당 경로에 실제 파일을 넣어주는 것이다. test.py 를 pyinstaller test.py로 하면 dist 폴더가 생성되면 test 폴더가 또 생성되고, 그 안에 test 실행파일이 만들어진다. 근데 test폴더 안에 torch 폴더가 존재하지 않는데, 가서 찾으니 없다고 뜨는 것. pyinstaller 파라미터 설정을 하여 바꿀 수도 있겠지만, 좀더 쉬운 방법은 실제 파일을 넣어주자. /home/your name/.local/lib/python3.6/torch 폴더를 복사해서 dist/test 폴더에 넣어주자. 주의!!본인 우분투 이름을 넣을 것 주의!!각자 사용하는 python..
Error: BadAccess (attempt to access private resource denied) 에러 X Error: BadAccess (attempt to access private resource denied) 10 Extension: 130 (MIT-SHM) Minor opcode: 1 (X_ShmAttach) Resource id: 0x1e0 OpenCV 로 Imshow 실행 시, 나오는 오류가 있음 python3 실행 시, QT_X11_NO_MITSHM=1을 붙일 것. 예시 QT_X11_NO_MITSHM=1 python3 script.py