i'm getting AttributeError: partially initialized module 'json' has no attribute 'loads' (most likely due to a circular import)
, i searched a lot on google an nothing worked. I don't have any module called json or something like that so that's not the problem.
My system is Macos . And i try to run Qgis modules with pycharm. This is the full error:
File "/Users/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/projs/project.py", line 3, in <module>
import json
File "/Applications/QGIS.app/Contents/Resources/python/json/__init__.py", line 106, in <module>
from .decoder import JSONDecoder, JSONDecodeError
File "/Applications/QGIS.app/Contents/Resources/python/json/decoder.py", line 5, in <module>
from json import scanner
File "/Applications/QGIS.app/Contents/Resources/python/json/scanner.py", line 5, in <module>
from _json import make_scanner as c_make_scanner
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/psycopg2/_json.py", line 33, in <module>
from psycopg2._psycopg import ISQLQuote, QuotedString
File "/Applications/QGIS.app/Contents/Resources/python/site-packages/psycopg2/__init__.py", line 67, in <module>
from psycopg2 import extensions as _ext
File "/Applications/QGIS.app/Contents/Resources/python/site-packages/psycopg2/extensions.py", line 192, in <module>
JSON, JSONARRAY = register_default_json()
File "/Applications/QGIS.app/Contents/Resources/python/site-packages/psycopg2/_json.py", line 137, in register_default_json
return register_json(conn_or_curs=conn_or_curs, globally=globally,
File "/Applications/QGIS.app/Contents/Resources/python/site-packages/psycopg2/_json.py", line 117, in register_json
JSON, JSONARRAY = _create_json_typecasters(
File "/Applications/QGIS.app/Contents/Resources/python/site-packages/psycopg2/_json.py", line 157, in _create_json_typecasters
loads = json.loads
AttributeError: partially initialized module 'json' has no attribute 'loads' (most likely due to a circular import)
Any ideas? I think it psycopg2 thing but couldn't find a solution