当我运行$ python -m weatherterm -a USNY1192:1:US -p WeatherComParser -td
为了在终端中输出解析后的数据,我得到以下错误:
Traceback (most recent call last):
File "C:\Python36\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec)
File "C:\Python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Reza\weather-app\weatherterm\weatherterm\__main__.py", line 81, in <module>
parser = cls()
File "C:\Users\Reza\weather-app\weatherterm\weatherterm\parsers\weather_com_parser.py", line 25, in __init__
self._request = Request(self._base_url)
TypeError: object() takes no parameters
如果您能告诉我们这里出了什么问题,我将不胜感激:
^{pr2}$
看看调用堆栈,我觉得weatherterm/core中的Request类有问题/请求.py. 请求类的初始值设定项应如下所示:
确保初始值设定项也获得一个
base_url
参数。在相关问题 更多 >
编程相关推荐