jcrona / gr-nfc

GNURadio blocks allowing decode NFC transactions
GNU General Public License v3.0
38 stars 16 forks source link

AttributeError: 'module' object has no attribute 'modified_miller_decoder' #1

Closed cyber-murmel closed 5 years ago

cyber-murmel commented 6 years ago

OS: Arch Linux

$ uname -a
Linux mbae-3 4.15.4-1-ARCH #1 SMP PREEMPT Sat Feb 17 16:01:38 UTC 2018 x86_64 GNU/Linux

My installation commands:

$ sudo pacman -S swig
$ git clone git@github.com:jcrona/gr-nfc.git
$ mkdir gr-nfc/build
$ cd gr-nfc/build
$ cmake ../
$ make
$ sudo make install
$ sudo ldconfig

Error message when running gnuradio rebuild from picture in blog post

Generating: '/home/marble/temp/top_block.py'

Generating: '/home/marble/temp/top_block.py'

Executing: /usr/bin/python2 -u /home/marble/temp/top_block.py

linux; GNU C++ version 7.2.1 20171224; Boost_106600; UHD_003.010.002.000-0-unknown

gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.11
built-in source types: file fcd rtl rtl_tcp uhd hackrf bladerf rfspace airspy 
Using rad1o with firmware git-24e7908 
Traceback (most recent call last):
  File "/home/marble/temp/top_block.py", line 255, in <module>
    main()
  File "/home/marble/temp/top_block.py", line 243, in main
    tb = top_block_cls()
  File "/home/marble/temp/top_block.py", line 176, in __init__
    self.nfc_modified_miller_decoder_0 = nfc.modified_miller_decoder(samp_rate)
AttributeError: 'module' object has no attribute 'modified_miller_decoder'
MarekNovakNXP commented 6 years ago

Same for me...

cyber-murmel commented 5 years ago

older than 1 year

KimlongSeng commented 2 years ago

/usr/local/lib/python3/dist-packages is the missing pieces for this /usr/local/include/nfc/ (fixed error no modules name nfc ) Solution: Create a File that link the nfc import (if error code : import nfc, no module name nfc ) $ cd /usr/lib/python3/dist-packages $ sudo su $ cat > path_mypath.pth $ sudo nano path_mypath.pth Type in /usr/local/lib/python3/dist-packages/ /usr/local/include/nfc/

and Ctrl+X And Save, Exit