Closed nodlek-ctrl closed 1 year ago
Likely the system doesn’t have ImageMagick installed.
I guess this is a Raspberry Pi, try to install it:
sudo apt install imagemagick
Then retry.
I think the code should give a clear solution for such case. I hereby leave a todo :)
P.S. Usually, energy efficiency is desired on a device like Raspberry Pi, so you may want to use PF2 font instead. See #11. (and #10 for some info, #29 for a real case. You don’t need ImageMagick for this.)
Thanks. I installed magick and now I get this error.
Right now, energy efficiency isn't a concern as I am not using batteries. Thanks for the tip however. Edit; Just read your last few words. Ill have a go at PF2.
Hell yeah! PF2 works a charm! Tanks again. I might have to take a look at that todo list and get some of the easy ones done for you!
IMHO Debian/Ubuntu always have outdated packages served (they call it “stable” 🙂), in your case it’s IM 6 but there’s already IM 7 a long time ago.
IM have some “policy” thing that controls what kind of thing could be converted or not, for security. It’s an XML config. Likely the default config doesn’t allow you to convert (either) from text (or) to PBM format (or both).
I forgot where it is and how to properly change it. The Internet may tell you more.
Congrats for solving your problem 🎉
I think this problem is a good point to start. If you can do Python, I have some idea —
Code relative to telling ImageMagick is here.
But it returns None
if not found, thus the initial problem happened.
We could make it more friendly to:
PATH
env), so try to install oneAnd more of it:
/boot/grub/
with os.walk
), or generate one (with grub-mkfont
and fonts in /usr/share/fonts
), or download one (from some URL)I think I should include a small PF2 font in next releases, just in case.
Alright! I can do python, I just usually struggle understanding larger scripts. Now that you've pointed out the important bit, I should be able to whip up a pull request sometime in the next week.
Good on you for helping people out! ⭐
Command executed-
Output-
I have tried-
Checking and creating diary.txt (not empty)
Power printer on and off
Most likely me doing something wrong, so some help would be fantastic.