728x90
App threw an error during load
Error: The module '\\?\C:\Users\talon\OneDrive\Desktop\focus\node_modules\cap\build\Release\cap.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 73. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at process.func (electron/js2c/asar.js:155:31)
    at process.func [as dlopen] (electron/js2c/asar.js:155:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:828:18)
    at Object.func (electron/js2c/asar.js:155:31)
    at Object.func [as .node] (electron/js2c/asar.js:155:31)
    at Module.load (internal/modules/cjs/loader.js:645:32)
    at Function.Module._load (internal/modules/cjs/loader.js:560:12)
    at Module.require (internal/modules/cjs/loader.js:685:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (C:\Users\talon\OneDrive\Desktop\focus\node_modules\cap\lib\Cap.js:3:13)

 

 

 

Thank you this helped! Just for reference if anyone is having the same issues, here are the commands you need to run that come from the link provided by @mscdex:

npm install --save-dev electron-rebuild

 

 

 

was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 73. Please try re-compiling or re-installing
the module

I see, thanks for pointing that out!

I get it now: npm rebuild uses my local node (ABI 72), which isn't what electron has.

The question is, how can I get electron rebuild to work? I have the latest electron-rebuild, v 1.8.6.

This is what I've tried so far:

  • If I run npx electron-rebuild right now, then run Electron, I get the same 72 vs 73 error.
  • If I then remove node_modules and npm install, then the error becomes 48 vs 73.
  • If I then downgrade electron to ^5, re-install node_modules, error goes to 47 vs 70.
  • If I then run electron-rebuild, no change. 47 vs 70
  • If I then run npm rebuild, it goes to 72 vs 70 (seems to make sense, my node is v12, Electron v5 expects a lower ABI version).

Thanks for the help!

728x90

VSCode 환경에서 OpenCV 를 설치할 때 꼭 문제되는 사항이 있다.

 왠지 심리적인 느낌으로 반드시 에러가 날 거라고 생각하긴 했지만 진짜 날 줄은 몰랏다.

 

다음과 같은 문제가 발생할 수 있다.

python -m pip install --upgrade pip
python -m pip install opencv-python

 

위에서 python -m 이 없는 경우에, 즉 pip 만을 이용해서 Library Module 을 import 때리려고 하는데

인식을 못하는 것이다.

 

더 큰 문제는 위와같이 때려도 문제가 나는 경우가 있는데, 그 경우에는 머리털이 곤두서게 된다.

 

(venv) $ pip2 install opencv-python
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting opencv-python
  Using cached opencv-python-4.3.0.38.tar.gz (88.0 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /home/pc_user/.venvs/venv/bin/python /home/pc_user/.venvs/venv/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp7q7z4L
       cwd: /tmp/pip-install-C21PKF/opencv-python
  Complete output (22 lines):
  Traceback (most recent call last):
    File "/home/pc_user/.venvs/venv/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
      main()
    File "/home/pc_user/.venvs/venv/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/pc_user/.venvs/venv/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-2FzygL/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 146, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "/tmp/pip-build-env-2FzygL/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 127, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-2FzygL/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 243, in run_setup
      self).run_setup(setup_script=setup_script)
    File "/tmp/pip-build-env-2FzygL/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 142, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 448, in <module>
      main()
    File "setup.py", line 99, in main
      % {"ext": re.escape(sysconfig.get_config_var("EXT_SUFFIX"))}
    File "/usr/lib/python2.7/re.py", line 210, in escape
      s = list(pattern)
  TypeError: 'NoneType' object is not iterable
  ----------------------------------------
ERROR: Command errored out with exit status 1: /home/pc_user/.venvs/venv/bin/python /home/pc_user/.venvs/venv/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp7q7z4L Check the logs for full command output.

 

나랑 완전 100% 같은 경우는 아닌데, 이분은 path 가 root 부터 시작하는 걸 보니 리눅스의 냄새다

 

거기다 가장 큰 단서는 _in_process.py 에서 롤린하다가 에러가 낫다는건데, ㅇ ㅣ부분에서 답변을 살펴보면

 

Python 2.7 is not supported anymore in opencv-python-4.3.0.38. Support was dropped in 4.3.0.36; see this issue.

The workaround I found was to install opencv-python version 4.2.0.32 (which is the latest supported for Python 2.7, see this for all releases) like this:

 

버전이 맘에 안든다는 이야기다

 

python -m pip install opencv-python==4.2.0.32

이렇게 해줫더니 깔끔하게 됫다.

 

stackoverflow.com/questions/63346648/python-2-7-installing-opencv-via-pip-virtual-environment

 

 

 

아! 추가적으로 혹시 모르니까

setting.json 에서 한줄 추가해준다.

"python.linting.pylintArgs": ["--extension-pkg-whitelist=cv2"] 

 

728x90

앱손에서 만든 CX3905 Series 복합기는 나온지 무지막지하게 오래된 녀석이다.

 

그도 그럴것이, 복합기의 프린터 드라이버나 스캐너 드라이버에 대해서

윈도우 XP 이후로는 스캐너 드라이버가 정상적으로 지원되지 않고 있다.

 

 

1. 

일단 해당 EPSON 홈페이지에 가서 아래와 같이 드라이버를 다운받아 준다.

 

여기서 프린터 & 스캐너 드라이버 (Windows Vista 지원) Null + 

CX3900H_V.exe 드라이버는 한글 제품이고

 

 

프린터 & 스캐너 드라이버 (Windows Vista 지원) Null + 

CX3900E_V.exe 드라이버는 영어 제품이다.

 

당연히 위에 것을 받아준다.

 

 

2. 호환성 보기에서 호환성 포팅을 해준다.

윈도우에서 그나마 간편해진 것이, 드라이버간의 일부 포팅이다

이것도 말 그대로 아키텍쳐가 같은 64비트나 32비트간의 포팅만 가능하지

 

32가 64로 간다거나 그런것은 안된다.

 

Windows XP 버전으로 바꾸면 안되고, Windows Vista 버전으로 바꾸면 작동한다.

그리고 나서 적용을 눌러주고 실행하면 된다.

 

4. 

필자의 경우는 복합기에서 잉크와 용지 부분에 양쪽 다 빨간색으로 불이 들어와서 깜빡깜빡 이고 있었는데, 이 부분에 대한 해결책은 다음과 같이

 

1. 전원을 끈다.

2. 잉크 공급 버튼과 용지걸림 버튼을 동시에 눌러준다 (EPSON CX3905 에서는 이 두개의 버튼이 1개의 버튼으로 통합되어있다.)

 

3. 전원에 노란불이 들어오면 2~3초후에 뗀다

 

4. 알아서 프린터 헤드가 정렬되고 정상으로 돌아온다

 

5. 

이제 신나게 스캐닝을 즐겨준다.

 

 

 

이렇게 거의 16년 이상된 복합기 스캐너를 살려보았다.

 

참조글

www.neten.com/FrontStore/PointBBS/iBoardView.phtml?bbsid=pbbs_faq&iArticleId=277

728x90

 

다음 우편번호 API가 보안상 강화이유로 패치되었다.

완전한 패치날짜는 2021년 03월 31일 분기경이다. 

 

따라서 뒤에오는 인자에 대해서 일반적으로 잘 허용하지 않는다.

 

 

1. Cosmosfarm Customizing quotation

//wp_register_script('daum-postcode', '//t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js', array('jquery'), NULL, true);
wp_enqueue_script('daum-postcode', '//t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js', array('jquery'), NULL, true);

 

해당 부분에서 뒤의 인자값에 대해서 NULL 값으로 등록되는 부분으로 패치한 것을 볼 수 있다.

뒤에 인자를 추가적으로 받지 않는다. 

(예전처럼 플러그인을 만들었다거나, 추가 커스터마이징을 해서 기록을 남겨두는 의미로 뒤의 의미없는 인자를 생략하겟다는 이야기)

 

Wooshiping 에서는 WSP_VERSION 관련된 인자가 쭉 이어져서, 추적하다보면 

"class-wsp-assets.php" 에서 Version Control 을 하는 것을 볼 수 있다.

 

 

[해당 부분에서 보고 패치]

postcode.map.daum.net/guide

 

Daum 우편번호 서비스

우편번호 검색과 도로명 주소 입력 기능을 너무 간단하게 적용할 수 있는 방법. Daum 우편번호 서비스를 이용해보세요. 어느 사이트에서나 무료로 제약없이 사용 가능하답니다.

postcode.map.daum.net

 

+ Recent posts