python - jupyter notebook 引发 AttributeError
问题描述
我正在使用 jupyter notebook 来测试我的 python 包,但是当我尝试运行我的包时,jupyter 会引发以下问题:
AttributeError: module 'logging' has no attribute 'config'
这里有一个类似的问题:Jupyter Notebook - Attribute Error: 'module' object has no attribute 'F_OK' 但是解决方案(降级 conda 和 python)对我来说并不满意。有人有其他想法吗?现在我只是在我的代码中注释该行并且它可以工作,但它不是很方便......
解决方案
您只需要添加import logging.config
它就可以解决您的问题。
推荐阅读
- r - 在 R 的 ifelse 语句中使用 setNames
- prestashop - Prestashop 1.7.7。结帐时出错
- android - Google Nearby Connections:在非 UI 线程上执行回调
- python - PyTorch 不使用可用的 GPU 内存
- c# - 在 Unity 中向 Notion API 发出 POST 请求
- c# - 如何在 .Net Core 中使用 Grpc 检索流式传输结果?
- react-native - 如何根据本机反应中的文本输入导航到某个文件?
- python - 根据多个条件和前行值更改列值 pandas
- angular - 我的验证方法是相反的,我似乎无法纠正它
- vaadin - Vaadin 14 网格初始行高不正确,行重叠