최근 Gnome Shell 통합 플러그인이 Firefox 및 Chrome에서 오작동하기 시작했습니다.
requests
몇 가지 조사 후에 모듈을 업데이트했지만 pip3
또 다른 오류가 발생했습니다.
File "/usr/bin/chrome-gnome-shell", line 220, in on_input
request = json.loads(text)
[10391] Exception: module 'json' has no attribute 'loads'
좀 더 조사를 해보고 알아냈어요이 GitHub 문제충돌하는 모듈과 관련하여 지정된 파일 중 내 파일 시스템에 존재하는 파일이 있는지 json
계속해서 찾습니다 . json.py
찾은 것을 모두 삭제했는데도 오류가 계속 발생합니다.
그런 다음 대화형 Python 셸을 열어 확인했지만 여전히 운이 좋지 않았습니다.
$ python3
Python 3.6.8 (default, Jan 14 2019, 11:02:34)
>>> import json
>>> json.loads
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'json' has no attribute 'loads'
>>> json.__path__
_NamespacePath(['/usr/local/lib/python3.6/dist-packages/json'])
>>> json.__file__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'json' has no attribute '__file__'
내 문제가 무엇인지 짐작할 수 없습니다. 어떤 아이디어가 있나요?
감사해요.
추가 정보:
$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
$ uname -a
Linux capt-XPS-13-9370 4.15.0-1050-oem #57-Ubuntu SMP Wed Aug 7 10:34:10 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ find / -name "json" 2>/dev/null
/home/capt/.config/yarn/global/node_modules/@angular-devkit/core/src/json
/home/capt/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/info/json
/home/capt/.cache/yarn/v2/npm-fs-extra-4.0.3-0d852122e5bc5beb453fb028e9c0c9bf36340c94/lib/json
/home/capt/.cache/yarn/v2/npm-fs-extra-6.0.1-8abc128f7946e310135ddc93b98bddb410e7a34b/lib/json
/home/capt/.cache/yarn/v2/npm-istanbul-reports-2.0.1-fb8d6ea850701a3984350b977a969e9a556116a7/lib/json
/home/capt/.cache/yarn/v2/npm-fs-extra-7.0.1-4f189c44aa123b895f722804f55ea23eadc348e9/lib/json
/home/capt/.cache/yarn/v2/npm-@angular-devkit/core-0.7.5-49f7854ccadf3ddda8d0ea4359543a1cbdc6854d/src/json
/home/capt/.cache/yarn/v2/npm-@angular-devkit/core-7.3.2-67ac2cfcbe47f1e457929c19ab1b04c9e061b2e2/src/json
/home/capt/.cache/yarn/v2/npm-core-js-2.5.7-f972608ff0cead68b841a16a932d0b183791814e/fn/json
/home/capt/.cache/yarn/v2/npm-core-js-2.5.7-f972608ff0cead68b841a16a932d0b183791814e/library/fn/json
/home/capt/.cache/yarn/v2/npm-core-js-2.3.0-fab83fbb0b2d8dc85fa636c4b9d34c75420c6d65/fn/json
/home/capt/.cache/yarn/v2/npm-core-js-2.3.0-fab83fbb0b2d8dc85fa636c4b9d34c75420c6d65/library/fn/json
/home/capt/.cache/yarn/v2/npm-babel-runtime-6.26.0-965c7058668e82b55d7bfe04ff2337bc8b5647fe/core-js/json
/home/capt/.cache/yarn/v2/npm-libphonenumber-0.0.10-e78bbf6601989cd09fa43504764688d41794148c/lib/closure/goog/json
/home/capt/.npm_modules/lib/node_modules/serverless/node_modules/core-js/fn/json
/home/capt/.npm_modules/lib/node_modules/serverless/node_modules/core-js/library/fn/json
/home/capt/.npm_modules/lib/node_modules/serverless/node_modules/fs-extra/lib/json
/home/capt/.npm_modules/lib/node_modules/serverless/node_modules/babel-runtime/core-js/json
/home/capt/.npm_modules/lib/node_modules/serverless/node_modules/aws-sdk/lib/json
/home/capt/.gradle/caches/modules-2/files-2.1/org.json/json
/home/capt/.gradle/caches/modules-2/metadata-2.58/descriptors/org.json/json
/home/capt/IdeaProjects/prj-front/node_modules/libphonenumber/lib/closure/goog/json
/home/capt/IdeaProjects/prj-front/node_modules/jszip/node_modules/core-js/fn/json
/home/capt/IdeaProjects/prj-front/node_modules/jszip/node_modules/core-js/library/fn/json
/home/capt/IdeaProjects/prj-front/node_modules/istanbul-reports/lib/json
/home/capt/IdeaProjects/prj-front/node_modules/core-js/fn/json
/home/capt/IdeaProjects/prj-front/node_modules/core-js/library/fn/json
/home/capt/IdeaProjects/prj-front/node_modules/fs-extra/lib/json
/home/capt/IdeaProjects/prj-front/node_modules/babel-runtime/core-js/json
/home/capt/IdeaProjects/prj-front/node_modules/@angular-devkit/core/src/json
/home/capt/IdeaProjects/prj-front/node_modules/find-yarn-workspace-root/node_modules/fs-extra/lib/json
/home/capt/IdeaProjects/PrjApi/build/resources/test/json
/home/capt/IdeaProjects/PrjApi/build/classes/java/main/com/prj/Prjapi/converter/json
/home/capt/IdeaProjects/PrjApi/src/main/java/com/prj/Prjapi/converter/json
/home/capt/IdeaProjects/PrjApi/src/test/resources/json
/usr/share/iso-codes/json
/usr/local/lib/python3.6/dist-packages/json
/usr/lib/python2.7/json
/usr/lib/x86_64-linux-gnu/ruby/2.5.0/json
/usr/lib/python3.6/json
/usr/lib/ruby/2.5.0/psych/json
/usr/lib/ruby/2.5.0/json
/snap/aws-cli/146/usr/lib/python3.6/json
/snap/core18/1074/usr/lib/python3.6/json
/snap/core18/1098/usr/lib/python3.6/json
/snap/gnome-3-28-1804/67/usr/lib/python3.6/json
/snap/gnome-3-28-1804/67/usr/share/iso-codes/json
/snap/gnome-3-28-1804/71/usr/lib/python3.6/json
/snap/gnome-3-28-1804/71/usr/share/iso-codes/json
/snap/core/7396/usr/lib/python3.5/json
/snap/core/7270/usr/lib/python3.5/json
/snap/intellij-idea-ultimate/165/plugins/spy-js/server/node_modules/archiver/lib/modules/json
/snap/intellij-idea-ultimate/165/plugins/textmate/lib/bundles/json
/snap/intellij-idea-ultimate/159/plugins/spy-js/server/node_modules/archiver/lib/modules/json
/snap/intellij-idea-ultimate/159/plugins/textmate/lib/bundles/json
/var/lib/gems/2.5.0/gems/activesupport-5.0.7/lib/active_support/json
/var/lib/gems/2.5.0/gems/activesupport-5.0.6/lib/active_support/json
답변1
디렉터리 에 json
가능한 범인이 포함된 디렉터리가 있을 수 있습니다. 제거해 보고 도움이 되는지 확인해 보세요.sys.path
__init__.py