0

I have recently upgraded Python and QGIS on my laptop and since then I cannot run the smart-map plugin. Whenever I try installing it, I get the following error message.

Couldn't load plugin 'Smart_Map' due to an error when calling its classFactory() method

ImportError: cannot import name 'find_stack_level' from 'pandas.util._exceptions' (C:\OSGeo4W\apps\Python39\lib\site-packages\pandas\util_exceptions.py)
Traceback (most recent call last):
File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 423, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:\Users/M Faisal/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Smart_Map_init.py", line 36, in classFactory
from .Smart_Map import smart_map
File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users/M Faisal/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Smart_Map\Smart_Map.py", line 91, in
import pandas as pd
File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:\OSGeo4W\apps\Python39\lib\site-packages\pandas_init.py", line 52, in
from pandas.core.api import (
File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\OSGeo4W\apps\Python39\lib\site-packages\pandas\core\api.py", line 14, in
from pandas.core.algorithms import factorize, unique, value_counts
File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\OSGeo4W\apps\Python39\lib\site-packages\pandas\core\algorithms.py", line 58, in
from pandas.core.indexers import validate_indices
File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:\OSGeo4W\apps\Python39\lib\site-packages\pandas\core\indexers_init.py", line 1, in
from pandas.core.indexers.utils import (
File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\OSGeo4W\apps\Python39\lib\site-packages\pandas\core\indexers\utils.py", line 18, in
from pandas.util._exceptions import find_stack_level
ImportError: cannot import name 'find_stack_level' from 'pandas.util._exceptions' (C:\OSGeo4W\apps\Python39\lib\site-packages\pandas\util_exceptions.py)

Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
QGIS version: 3.28.4-Firenze Firenze, fd0fb72ab

One of the solution of this error from this link was to downgrade the panda's version on my laptop. However, the installation of downgraded version also got error and to resolve that error, I installed visual studio too but couldn't resolve that.

Faisal
  • 1
  • 1

0 Answers0