后来上网找了一下。发现是 构造方法 __init__ 两边的下划线是双下划线,我写的是单下划线。

读书不认真,该打。

特此记录。

python 报错: Dog() takes no arguments的更多相关文章

  1. git 生成密匙时遇到报错 :Too many arguments.

    今天在我用新电脑想要向github上的远程库上传项目时,由于新电脑上的本地库没有与远程库建立连接,所以要在本地生成密匙添加到github上才可以上传,在我执行命令 ssh-keygen -t rsa- ...

  2. Python报错总结丶自定义报错

    Python报错总结: 常见异常 1,NameError: name 'a' is not defined:未定义函数名             2,IndentationError: uninden ...

  3. Python报错module 'scipy.misc' has no attribute 'xxx'

    Python报错module 'scipy.misc' has no attribute 'imresize' 解决办法: 安装Pillow包,命令如下: pip install Pillow 然后重 ...

  4. selenium python 报错“ unable to find binary in default location”

    selenium python 报错如下: raise exception_class(message, screen, stacktrace)selenium.common.exceptions.W ...

  5. 解决Python报错:local variable 'xxx' referenced before assignment(引)

    解决Python报错:local variable 'xxx' referenced before assignment(引) 解决Python报错:local variable 'xxx' refe ...

  6. python 报错 wxPyDeprecationWarning: Using deprecated class PySimpleApp.

    如题:python 报错 提示为 : wxPyDeprecationWarning: Using deprecated class PySimpleApp. 解决:将 wx.PySimpleApp() ...

  7. PyCharm 中文 字符 python 报错 的 完美 解决方案!

    PyCharm 中文 字符 python 报错 的 完美 解决方案! #_*_ coding:utf-8_*_ https://www.python.org/dev/peps/pep-0263/ 到p ...

  8. Python报错ModuleNotFoundError: No module named 'numpy'

    转载:https://blog.csdn.net/qq_39779233/article/details/103224712 Python报错ModuleNotFoundError: No modul ...

  9. 新手常见的python报错及解决方案

    此篇文章整理新手编写代码常见的一些错误,有些错误是粗心的错误,但对于新手而已,会折腾很长时间才搞定,所以在此总结下我遇到的一些问题.希望帮助到刚入门的朋友们.后续会不断补充. 目录 1.NameErr ...

  10. python报错函数传参数传多了

    写python的时候报错: Exception : Traceback (most recent call last): File , in __bootstrap_inner self.run() ...

随机推荐

  1. requests.session之set trust_env to disable environment searches for proxies

    import requests s = requests.Session() s.trust_env = False This will prevent requests getting any in ...

  2. nignx reload的时候报错invalid PID number

    第一种思路是从PID号着手,提示无效PID号时nginx.pid文件为空,将进程的PID号追加到空的nginx.pid上,问题解决: 还有问题,请参考:https://www.cnblogs.com/ ...

  3. macOS 安装设置 Tunnelblick (openvpn 替代)

    1、下载.安装 2、准备好 openvpn 相关的文件,全部放在一个目录中.主要有以下几个: ca.crt client.crt client.key client.ovpn 3、打开 client. ...

  4. SpringCloud之自动化配置-config

    编程开发的时候有没有觉得很多配置文件需要维护,比如,修改了数据库连接,所有用到该数据库的服务配置都得替换,是不是超级的麻烦呢 下面,给大家介绍一下Spring提供的配置自动化组件-spring clo ...

  5. java类加载器的一些测试

    package classloader; import java.lang.reflect.Method; import org.junit.Test; import com.example.Samp ...

  6. 服务器上创建git仓库

    1. 在服务器上 su - git ,切换用户 2. 创建一个目录    mkdir test.git ,请注意带上 .git 扩展 3. 切换进入此目录,git init --bare  ,初始化裸 ...

  7. Codeforces 768A Oath of the Night's Watch 2017-02-21 22:13 39人阅读 评论(0) 收藏

    A. Oath of the Night's Watch time limit per test 2 seconds memory limit per test 256 megabytes input ...

  8. ubuntu解压文件命令大全

    ubuntu 下rar解压工具安装方法: 压缩功能 安装 sudo apt-get install rar 卸载 sudo apt-get remove rar 解压功能 安装 sudo apt-ge ...

  9. spark配置文件和执行部分代码

    export SPARK_DAEMON_JAVA_OPTS="-Dspark.deploy.recoveryMode=ZOOKEEPER-Dspark.deploy.zookeeper.ur ...

  10. Oracle EBS Patch Demo

    Oracle EBS APP & DB 打补丁过程简述l例子: 打 Patch#   11843100:R12.CAC.B 打PATCH之前先查询一下是否已经有了这个PATCH. SELECT ...