Python Forum
Illegal instruction? working code for months?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Illegal instruction? working code for months?
#2
"illegal instruction" means the pi is trying to run code that isn't correct for that machine. This isn't a problem with your python script, it's a problem with the actual python executable or one of the modules imported by your script. You might be able to tell just by seeing if python3 runs on its own. Does python3 -c "print('ok')" work or get the same error? If that works, you might be able to find what module is causing the problem.

Unfortunately if python3 is broken, sorting that out is going to be something on the Pi side. Could be you need to update some packages, could be it would be better to restart from scratch. We can't tell what happened. Maybe something updated some packages from the wrong repo. Maybe the SD card filesystem became corrupted from a powerdown. Might need to ask in a Pi forum.
Reply


Messages In This Thread
RE: Illegal instruction? working code for months? - by bowlofred - Aug-04-2021, 04:11 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  New to Python - Not sure why this code isn't working - Any help appreciated TheGreatNinx 4 964 Jul-22-2023, 10:21 PM
Last Post: Pedroski55
  code not working when executed from flask app ThomasDC 1 896 Jul-18-2023, 07:16 AM
Last Post: ThomasDC
  Illegal instruction (core dumped) when import pandas. amandacstr 1 2,109 Dec-31-2022, 11:31 PM
Last Post: stevendaprano
  I am new to python and Could someone please explain how this below code is working? kartheekdas 2 1,017 Dec-19-2022, 05:24 PM
Last Post: kartheekdas
Exclamation My code is not working as I expected and I don't know why! Marinho 4 1,085 Oct-13-2022, 08:09 PM
Last Post: deanhystad
  My Code isn't working... End3r 4 1,935 Mar-21-2022, 10:12 AM
Last Post: End3r
  I don't undestand why my code isn't working. RuyCab 2 1,995 Jun-17-2021, 03:06 PM
Last Post: RuyCab
  How to convert dates in odd format to months lokhtar 2 2,240 Apr-17-2021, 11:54 AM
Last Post: lokhtar
  code is not working , can anybody help? RandomPerson69 4 2,916 Mar-22-2021, 04:24 PM
Last Post: deanhystad
  Short code for EventGhost not working Patricia 8 3,697 Feb-09-2021, 07:49 PM
Last Post: Patricia

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020