Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"illegal operation" error message #27

Closed
crazy-raptor opened this issue Dec 20, 2021 · 25 comments
Closed

"illegal operation" error message #27

crazy-raptor opened this issue Dec 20, 2021 · 25 comments

Comments

@crazy-raptor
Copy link

started a fresh install and when I get try to run python3 screen-calendar-get.py I get a return that just says "illegal operation"

worked through the installation guide, used a fresh raspberry pi image on a pi zero w (got it previously to work with the outlook calendar but wanted to try the google one (got the credentials.json file made and in the waveshare directory)

let me know if you seen this before and what other info is needed?

@mendhak
Copy link
Owner

mendhak commented Dec 20, 2021

Never seen that before except in a meme. Are you getting any other info aside from the message, any stack trace?

The main thing I'd want to find out is which line of code is causing that problems.

In the env.sh you can set export LOG_LEVEL=DEBUG and that should hopefully show a bit more info about what's happening just before the error occurs.

I'll also have a go in a fresh VM to see if something has changed in recent releases of some library. I'm assuming you're having the problem with Google Calendar setup.

@mendhak mendhak changed the title illegal "illegal operation" error message Dec 20, 2021
@crazy-raptor
Copy link
Author

crazy-raptor commented Dec 20, 2021 via email

@mendhak
Copy link
Owner

mendhak commented Dec 20, 2021

Oh illegal instruction, that is an important distinction. That's indicating that your python3 installation is not compatible with your hardware. For example it could be an x64 python trying to run on an ARM raspberry pi. What os did you install, and did you do any special steps to install anything else?

@crazy-raptor
Copy link
Author

crazy-raptor commented Dec 20, 2021 via email

@crazy-raptor
Copy link
Author

crazy-raptor commented Dec 21, 2021 via email

@crazy-raptor
Copy link
Author

crazy-raptor commented Dec 21, 2021 via email

@mendhak
Copy link
Owner

mendhak commented Dec 27, 2021

OK after you reinstalled, did the problem go away? As in were you able to run the run.sh script without a problem this time?

@crazy-raptor
Copy link
Author

crazy-raptor commented Dec 27, 2021 via email

@crazy-raptor
Copy link
Author

crazy-raptor commented Dec 28, 2021 via email

@crazy-raptor
Copy link
Author

crazy-raptor commented Dec 28, 2021 via email

@mendhak
Copy link
Owner

mendhak commented Dec 28, 2021

Ah ok so looks like there have been some updates, and inkscape isn't taking the e argument anymore. And some additional problems you've found. I think I'll have to reimage my RPi and try it again from scratch.

the display updates now but doesnt show the time of the appointment!

Are you connecting to a calendar, what happens when you remove 'calendar.pickle', then run

python3 screen-calendar-get.py

@crazy-raptor
Copy link
Author

crazy-raptor commented Dec 28, 2021 via email

@mendhak
Copy link
Owner

mendhak commented Dec 28, 2021

If you're not seeing any times then those might be all day events in Google Calendar. Any events with times against them should appear like this

[screen-calendar-get.py:176] main() - {'CAL_DATETIME_1': 'Wed Dec 29, 8:00 AM - 12:00 PM', 'CAL_DESC_1': 'Some timed event', 'CAL_DATETIME_2': 'Thu Dec 30', 'CAL_DESC_2': 'Some all day event'}

@crazy-raptor
Copy link
Author

crazy-raptor commented Dec 28, 2021 via email

@mendhak
Copy link
Owner

mendhak commented Dec 28, 2021

Yeah it won't update right away, there's a cache file (otherwise you'll hit a rate limit and get blocked). If you delete the calendar.pickle file, then the code should get the meetings fresh from Google Calendar.

@mendhak
Copy link
Owner

mendhak commented Dec 29, 2021

I've been able to recreate the 'illegal operation' error. It's very odd. I did a brand new card, flashed Raspberry Pi OS Lite. Installed things. And then I started getting 'illegal operation' on normal commands, not just related to this project. Just running pip3 would give me that error. When I re-flashed, and ran the install steps again,things started working again. So the problem did appear in front of me, just not reliably reproducible. I bet if I flash the card again, it'll start failing again. Intermittent problems, that's the worst kind of problem!

I'll adjust instructions in the documentation as well, to includ pigpiod. And see if there's a simpler way to do some of the steps.

@mendhak
Copy link
Owner

mendhak commented Dec 29, 2021

Good news. Well it's probably a bit late for you so it's "OK News".

I've redone the instructions with Raspberry Pi OS. It's muuuuuch simpler now. pigpio is already available via apt, so there's no more make instructions required, I've removed a bunch of unused dependencies. I've also replaced inkscape with cairosvg as well so need for the fonts workaround.

The setup section is much simpler now.

If you do decide to get latest you'll want to rerun the dependencies instructions but it should be shorter this time.

@crazy-raptor
Copy link
Author

crazy-raptor commented Dec 29, 2021 via email

@mendhak
Copy link
Owner

mendhak commented Dec 29, 2021

I've reflashed about 10-15 times today and only got that problem once. 😞 I really think this has something to do with the Raspberry Pi Bullseye image.

I don't know if it makes a difference, you could try using the Raspberry Pi imager here: https://www.raspberrypi.com/software/

image

When you open this software press Ctrl+Shift+X and it will open an advanced menu where you can enable SSH and set a username password and enable WIFI too.

@crazy-raptor
Copy link
Author

crazy-raptor commented Dec 29, 2021 via email

@mendhak
Copy link
Owner

mendhak commented Jan 7, 2022

@crazy-raptor in case you run into the error again I found the solution.

#29 (comment)

I've also updated the instructions in the README to download the fixed package version so that should take care of future installers.

@mendhak mendhak closed this as completed Jan 8, 2022
@crazy-raptor
Copy link
Author

crazy-raptor commented Jan 8, 2022 via email

@mendhak
Copy link
Owner

mendhak commented Jan 8, 2022

That's a good idea and I think it's not too difficult. Would appreciate if you did that, share the SVG.

In the coding side it would be a matter of letting the user specify some environment variable, which causes that 'calendar only' SVG to be picked.

And specifying the dimensions required for the output screen

@crazy-raptor
Copy link
Author

crazy-raptor commented Jan 8, 2022 via email

@mendhak
Copy link
Owner

mendhak commented Jan 8, 2022

I think I've heard of it but never looked into it. It seems interesting in that it would only run the application you put on it, no OS extras. I'm not familiar with how microcontroller types would be set up. I'm guessing for a project like this, you'd need to find an eink display for it + networking module + battery module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants