Python divmod错误

Python divmod错误,python,divmod,Python,Divmod,正在尝试运行一些代码。当我这样做时得到这个错误。我以为我已经安装了所有必要的依赖项,但仍然出现了这个错误 linux;GNU C++版本4.8-1;Boost_105300;UHD_003.007.000-133-g6bd9fed2 Traceback (most recent call last): File "/usr/local/bin/tpms_rx", line 274, in <module> main() File "/usr/local/bin/tpm

正在尝试运行一些代码。当我这样做时得到这个错误。我以为我已经安装了所有必要的依赖项,但仍然出现了这个错误

linux;GNU C++版本4.8-1;Boost_105300;UHD_003.007.000-133-g6bd9fed2

Traceback (most recent call last):
  File "/usr/local/bin/tpms_rx", line 274, in <module>
    main()
  File "/usr/local/bin/tpms_rx", line 265, in main
    tb = top_block(source, args)
  File "/usr/local/bin/tpms_rx", line 229, in __init__
    self.source = source_rtlsdr(args.tuned_frequency, args.if_rate)
  File "/usr/local/lib/python2.7/dist-packages/tpms/source.py", line 98, in __init__
    rf_decimation, rf_decimation_remainder = divmod(rf_sampling_rate, if_sampling_rate)
TypeError: unsupported operand type(s) for divmod(): 'int' and 'NoneType'
回溯(最近一次呼叫最后一次):
文件“/usr/local/bin/tpms_rx”,第274行,在
main()
文件“/usr/local/bin/tpms_rx”,第265行,主目录
tb=顶部块(源,参数)
文件“/usr/local/bin/tpms_rx”,第229行,在初始化中__
self.source=source\u rtlsdr(args.tuned\u频率,args.if\u速率)
文件“/usr/local/lib/python2.7/dist-packages/tpms/source.py”,第98行,在__
rf_抽取,rf_抽取_余数=divmod(rf_采样率,if_采样率)
TypeError:divmod()的操作数类型不受支持:“int”和“NoneType”

运行程序时,需要将一个参数
-i
/
--if rate
或默认值为
None
,该参数最终在两层之后传递到
divmod


见和另外。

同样,为什么当你使用Python时你在谈论C++编译器版本?看起来好像你传递到DIVMOD的2个参数之一是“代码> NON/COMPUT>”所以它寻找什么参数?我看到频率已经设置好了,是不是在寻找我需要确定的其他东西?你有这个功能吗?如果有,你用了什么?