python报错问题—— xxx takes 1 positional argument but 2 were given

出现这个问题的原因是,函数在定义的时候少了self,如果写成def get_html(url),这时候就会报错 get_html() takes 1 positional argument but 2 were given

python报错问题—— xxx takes 1 positional argument but 2 were given_第1张图片

你可能感兴趣的:(python遇到的问题,报错信息)