问题描述

AttributeError("'StaticApp' object has no attribute 'directory'")
Traceback (most recent call last):   File
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/web/wsgiserver/wsgiserver3.py",
 line 1089, in communicate
     req.respond()   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/web/wsgiserver/wsgiserver3.py",
 line 877, in respond
     self.server.gateway(self).respond()   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/web/wsgiserver/wsgiserver3.py",
 line 1982, in respond
     for chunk in response:   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/web/httpserver.py",
 line 255, in __iter__
     path = self.translate_path(self.path)   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/server.py",
 line 820, in translate_path
     path = self.directory

AttributeError: 'StaticApp' object has no attribute 'directory'

解决方案

升级web.py

pip install --upgrade web.py

web.py==0.62已解决此问题

参考文章

WEBPY / Serving static files : 'StaticApp Object has no attribute 'directory'

web.py——运行错误【AttributeError: ‘StaticApp‘ object has no attribute ‘directory‘】相关推荐

  1. 使用face_recognition模块:错误AttributeError:'PngStream' object has no attribute 'chunk fcWp'

    使用face_recognition模块:错误AttributeError:'PngStream'object has no attribute 'chunk fcWp' 文章目录: 一.错误:Att ...

  2. 求助!spyder beautifulsoup4显示错误:AttributeError: 'HTMLParserTreeBuilder' object has no attribute 'initia

    spyder beautifulsoup4显示错误: AttributeError: 'HTMLParserTreeBuilder' object has no attribute 'initia 实 ...

  3. pytorch 错误 AttributeError: ‘Tensor‘ object has no attribute ‘backword‘

    pytorch 错误 AttributeError: 'Tensor' object has no attribute 'backword' 按错误说明是没有backword属性. 错误代码 loss ...

  4. python 错误AttributeError: ‘dict_keys‘ object has no attribute ‘sort‘

    当运行Python代码时,出现以下错误: AttributeError: 'dict_keys' object has no attribute 'sort' 当代码有sort函数时,检查其他代码都没 ...

  5. Scrapy Crawl 运行出错 AttributeError: 'xxxSpider' object has no attribute '_rules' 的问题解决...

    按照官方的文档写的demo,只是多了个init函数,最终执行时提示没有_rules这个属性的错误日志如下: ......File "C:\ProgramData\Anaconda3\lib\ ...

  6. iteritems python3_Python3下错误AttributeError: ‘dict’ object has no attribute’iteritems‘的分析与解决...

    引言 目前Python2和Python3存在版本上的不兼容性,这里将列举dict中的问题之一.下面话不多说,来看看详细的介绍: 1. Python 2  vs python 3 根据Python社区的 ...

  7. AttributeError: 'NoneType' object has no attribute 'sc' 解决方法(二)

    上一次本以为可以解决了这个问题,然而并没有那么地简单.博主最近在edx网站学习pyspark,想打一下视频上的代码,结果报错了,依旧是报了"AttributeError:'NoneType' ...

  8. OSError: [WinError 1455] 页面文件太小,无法完成操作和AttributeError: ‘NoneType‘ object has no attribute ‘_free_wea

    在网上查找了几个方法: 方法一:将代码中数据读取的地方,文件在 yolov5\utils\datasets.py,num_workers设置为0:最新的yolov5代码没有datasets.py文件, ...

  9. Python 报错解决:AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

    早上升级完pip,后报错如下: -> # pip install --upgrade pwntools /usr/local/lib/python2.7/dist-packages/pip/_v ...

最新文章

  1. 设计一条简单的等待工作队列之软件模型设计与实现(二)
  2. Visual Studio 2008 每日提示(二十三)
  3. CH 5102Mobile Service题解
  4. 年仅59岁!又一国家杰青不幸逝世
  5. 开发小计之判断输入字符串类型(正则表达式)
  6. MATLAB中unwrap函数
  7. AirPlay 投影到 Mac 看不到选项如何解决?
  8. net安装包的制作[包括卸载模块](图解)
  9. 数据库周刊40丨OceanBase官网上线开发者社区;人民日报关注易鲸捷;2020中国系统架构师大会10月线上召开;数据库迁移经验分享;MySQL大表超字段问题;SQL高级知识;Oracle等待事件
  10. Latex --- 加三级子标题,解决没有编号问题(已解决)(加头文件即可)
  11. Android 9.0系统软件进入视频界面发生闪退
  12. HTML在线颜色选择器源码
  13. 四川川之音文化传媒有限公司:电商物流运行呈加快恢复态势
  14. 服务器运行Microsoft.Office.Interop.Word出错{00024500-0000-0000-C000-000000000046}问题总结
  15. 【DBA笔记2】Oracle之定期清理inactive会话
  16. xinetd 服务
  17. MySQL面试题学习笔记
  18. 爬坑”无法找到 .NET Core SDK。请检查确保已安装此项且 global.json 中指定的版本(如有)与所安装的版本相匹配“
  19. Adapter(适配器)模式总结
  20. 一条宽带多人共享违法?

热门文章

  1. Objective-C基础教程学习笔记(九)内存管理
  2. pythin怎么根据月份获取月初和月末_数据统计丨7月份塑料市场明显回暖,8月份是否延续乐观行情?...
  3. python xlsx 图片_实例11:用Python给Excel所有工作表添加图片
  4. soapui返回值类型都有哪些_货架的类型都有哪些呢
  5. 前端vue适配不同的分辨率_浅析 React / Vue 跨端渲染原理与实现
  6. 为什么long类型的变量需要加L初始化
  7. zabbix前端php界面,zabbix简介及安装
  8. 深度学习和目标检测系列教程 4-300:目标检测入门之目标变量和损失函数
  9. 七、Linux 常用 Shell 命令,控制台的快捷键以及 Shell 编程(上)
  10. 四十七、Tableau地理可视化