最近使用Pychorm编写Python时,每次要引入自定义模块,就会报错,提示“Unresolved reference”

Unresolved reference 'LoginClass' more... (Ctrl+F1)

This inspection detects names that should resolve but don't. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Top-level and class-level items are supported better than instance items.

百度试了很多方法,结果都没用,最后很简单用一步就解决了,大家都可以试试

右击被调用模块存在的文件夹,“MarkDictionary as”-->“Sources root”

再次查看,报错消失了。

Pychorm提示Unresolved reference 导入模块报错的更多相关文章

  1. cmd命令中运行pytest命令导入模块报错解决方法

    报错截图 ImportError while loading conftest 'E:\python\HuaFansApi\test_case\conftest.py'. test_case\conf ...

  2. python导入模块报错:ImportError: No module named mysql.connector(安装 mysql)

    python的版本是 $ python --version Python 2.7.12 报错代码如下 import mysql.connector 报错信息是 ImportError: No modu ...

  3. 服务器安装tensorflow导入模块报错Illegal instruction (core dumped)

    在ubuntu上安装tensorflow后导入模块显示Illegal instruction (core dumped) 服务器的版本是Ubuntu 16.04.5 降低版本,成功导入模块 pip3 ...

  4. ubuntu导入torch模块报错

    ubuntu下导入torch报错 >>> import torchIllegal instruction (core dumped) 安装pytorch 去pytorch官网下载py ...

  5. PyCharm导入模块报No model named

    PyCharm导入模块报No model named 引言 在PyCharm中同目录下import其他模块,出现No model named ...的报错,但实际可以运行的情况. 这很可能是因为PyC ...

  6. pycharm安装 suds模块报错:AttributeError: module 'pip' has no attribute 'main'

    需求:安装suds模块 遇到的问题: 一.报错信息:[file][Default Settint]---Project Interpreter 点击 搜索suds安装模块报错 解决:依据上图提示找到C ...

  7. python导入openpyxl报错问题,终于解决啦

    问题:折腾了一上午,安装.卸载openpyxl多次,cmd中明明显示安装成功,可python文件import时就是报错 1.安装openpyxl后,python文件导入一直报错,经过一上午的努力,终于 ...

  8. sphinx :undefined reference to `libiconv' 报错解决办法

    sphinx :undefined reference to `libiconv' 报错解决办法   2013-11-30 21:45:39 安装sphinx时不停报错...郁闷在make时报错,错误 ...

  9. maven项目引用时,导入类报错,选择两个项目同时执行Maven update

    maven项目引用时,导入类报错,选择两个项目同时执行Maven update springboot引入第三方jar,需要扫描时加@ComponentScan("第三方的包名") ...

随机推荐

  1. Planning CodeForces - 854C

    Planning CodeForces - 854C 题意:有n架航班,第i架原先的时候是在第i分钟起飞的.现在前k分钟无法有飞机起飞,因此需要调整安排表,延后飞机起飞.仍然要求每一分钟只有一架飞机起 ...

  2. 题解报告:hdu 2141 Can you find it?(二分)

    Problem Description Give you three sequences of numbers A, B, C, then we give you a number X. Now yo ...

  3. Eclipse的ant调用maven

    需要在 eclipse 的 windows - preferences - ant - runtime - classpath - global entries 加入 eclipse 里面的 jsch ...

  4. 关于bootstrap table的server分页

    首先是bootstrap初始化的表格参数: // 初始化Table oTableInit.Init = function() { $('#booksTable').bootstrapTable({ u ...

  5. 513 Find Bottom Left Tree Value 找树左下角的值

    给定一个二叉树,在树的最后一行找到最左边的值. 详见:https://leetcode.com/problems/find-bottom-left-tree-value/description/ C+ ...

  6. rhel6.5--http练习

    包名 简介 httpd-2.2.15-29.el6_4.x86_64.rpm         http服务的主程序包 httpd-devel-2.2.15-29.el6_4.x86_64.rpm ap ...

  7. Spark MLlib编程API入门系列之特征选择之卡方特征选择(ChiSqSelector)

    不多说,直接上干货! 特征选择里,常见的有:VectorSlicer(向量选择) RFormula(R模型公式) ChiSqSelector(卡方特征选择). ChiSqSelector用于使用卡方检 ...

  8. python绘图工具包 matplotlib 中文乱码问题

    环境: python2.7 windows 8.1 解决: 改配置文件,把字体改为支持中文的字体. 找到python安装目录下的 \Lib\site-packages\matplotlib\mpl-d ...

  9. Android中进程与线程及如何在子线程中操作UI线程

    1. Android进程 一个应用程序被启动时,系统默认创建执行一个叫做"main"的线程.这个线程也是你的应用与界面工具包(android.widget和android.view ...

  10. ubuntu下安装方式汇总

    apt-get 可辅助通过 apt-cache search curl | grep php 查找已支持的插件,然后通过下面apt-get下载安装,例: apt-get install php5-cu ...