-1

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

linux; GNU C++ 版本 4.8.1;升压_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'
4

1 回答 1

0

当你运行你的程序时,你需要传递一个参数-i/--if-rate否则默认值是None最终被传递的,2 层之后,到divmod.

另请参阅https://github.com/jboone/gr-tpms/blob/master/apps/tpms_rxhttps://github.com/jboone/gr-tpms/blob/master/python/source.py

于 2014-04-21T01:47:39.077 回答