导入 Flask TypeError: issubclass() arg 1 must be a class

时间:2021-05-18 01:26:11

标签: python pycharm pydev

使用 python 3.8,烧瓶 1.1.2

在使用 pycharm 调试错误模式时发现当我导入 from flask_restful import Api 时它输出错误。

奇怪的是,一切正常,突然出现错误。出现错误后代码仍然运行。

我已经阅读了其他相关帖子,但仍然不明白。

完整代码:

from flask import Flask, request, render_template, jsonify
from flask_restful import Api

完整回溯:

Traceback (most recent call last):
  File "/snap/pycharm-community/238/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_xml.py", line 169, in _get_type
    if resolver.can_provide(type_object, type_name):
  File "/snap/pycharm-community/238/plugins/python-ce/helpers/pydev/pydevd_plugins/extensions/types/pydevd_plugin_numpy_types.py", line 28, in can_provide
    return nd_array is not None and issubclass(type_object, nd_array)
TypeError: issubclass() arg 1 must be a class

0 个答案:

没有答案