python error Traceback (most recent call last):

somya's picture

Offline

Joined: Sep 18, 2018

Replies: 4
python error Traceback (most recent call last):
July 9, 2019 - 1:39pm

Hi, while running the python code in my raspberry pi3, i got this error 

Traceback (most recent call last):
  File "nrfsendrecv.py", line 11, in <module>
    radio.begin(0, 17)
  File "/home/pi/lib_nrf24_master/lib_nrf24.py", line 373, in begin
    self.spidev.open(0, csn_pin)
FileNotFoundError: [Errno 2] No such file or directory

please help me..i have installed every necessary library but this seems not working. 

 

Abhiemanyu Pandit's picture

Offline

Joined: Jan 21, 2019

Replies: 42

okay so this is clearly a problem of enabling SPI from Raspberry configurations. I would suggest you  go to Raspberry Configuration page and enable the SPI first then you wont see this error anymore. also when you enable or make the changes on raspi config then your raspberry pi will reset so dont panic and wait for the reset. 

from terminal use command "sudo raspi-config" to enter into configuration page and enable SPI yes. reply if this help

Muhammad Umar's picture

Offline

Joined: Apr 09, 2020

Replies: 55

This is very common issue while working with raspberry pi. Sometimes, we create our sketch on raspberry pi and when we try to debug it and check for the working of code written, we get such type of errors, which tell us that there is a configuration issues, which we have to enable from the raspberry pi control panel which you can access by typing sudo raspi-config in terminal window, the for enabling/disabling a specific configuration you just need to enable that one and wait for a few minutes, so that raspberry pi can reset and after that when you run your code, the issue get resolved. Here I recommend you to get connect with the technical support team of SSLA for getting better assistance regarding any issues like this.

Technical Shahzad's picture

Offline

Joined: May 23, 2020

Replies: 48

This is a very common issue while working with raspberry pi. Sometimes, we create our sketch on raspberry pi and when we try to debug it and check for the working of code written, we get such type of errors, which tell us that there is a configuration issues, which we have to enable from the raspberry pi control panel which you can access by typing sudo raspi-config in terminal window, the for enabling/disabling a specific configuration you just need to enable that one and wait for a few minutes, so that raspberry pi can reset and after that when you run your code, the issue get resolved. Here I recommend you to get connected with the technical support team of Sierra Software Ltd. for getting better assistance regarding any issues like this.