Archive for the ‘Errors’ tag
Python’s base64 Module Fails to Decode Unicode Strings
If you’ve got a base64 string as a unicode object and you try to use Python’s base64 module with altchars set, it fails with the following error:
TypeError: character mapping must return integer, None or unicode
This is pretty unhelpful error message also occurs if you try any method that indirectly use altchars. For example:
base64.urlsafe_b64decode(unicode('aass')) base64.b64decode(unicode('aass'),'-_')
both fail while the following works:
base64.urlsafe_b64decode('aass') base64.b64decode(unicode('aass'))
While it’s not complicated to fix it (just convert any unicode string to ascii string), it’s still annoying.
NVidia driver fails to initialize after X restart
This is mainly a note to myself. Sometimes when the X server is restart it complains that nvidia driver couldn’t be initialized and that no screens were found. This may be a result of a version mismatch between X11′s and the kernel’s nvidia module. The solution is to
modprobe -r nvidia
before restarting the X server.
\lyxframeend Undefined when Using Beamer with Lyx
I’m using LyX for the first time with Beamer. Making the title page was smooth. But when I’ve tried adding a new frame (using BeginFrame) I was confronted with the following error
\lyxframeend
{}\lyxframe{Outline}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.After comparing my document to example (working) beamer documents I’ve found out that you must have an EndFrame command after your last frame.Too bad it wasn’t documented anywhere I’ve found as this little thing drove me crazy.
Kernel Configuration for acpid Issue
I’ve installed acpid on my system some time ago (Gentoo package: sys-power/acpid. However each time I tried to start it it complained:
acpid: can't open /proc/acpi/event: No such file or directory
Apparently acpid requires you to enable ACPI_PROC_EVENT, which in it’s labels states “Deprecated /proc/acpi/event support”. I really wonder why such tool only support the deprecated way to receive the ACPI events.
LaTeX Error: Command \textquotedbl unavailable in encoding HE8
I was testing today the SVN version of LyX 1.6.0 and 1.5.7. Due to a change in the way the double quotation mark (“) is handled, adding it to Hebrew text resulted in the following LaTeX error:
LaTeX Error: Command \textquotedbl unavailable in encoding HE8
Alpha Channel Problems When Creating .ico Files Using ImageMagick
I’ve tried to use ImageMagick to create .ico files for Open Yahtzee, out of PNGs of various sizes. The command as it should have been:
convert openyahtzee16.png openyahtzee32.png openyahtzee64.png openyahtzee.ico
resulted in the alpha channel being reversed. I’ve used ImageMagick 6.4.0, and I didn’t remember this misbehavior happening in the previous versions.
While this annoyed, and was due to no apparent reason, it could be easily solved using the ImageMagick switches to reverse the alpha channel:
-channel Alpha -negate
So the command that produces a correct .ico file was:
convert openyahtzee16.png openyahtzee32.png openyahtzee64.png -channel Alpha -negate openyahtzee.ico
NVRM: not using NVAGP, kernel was compiled with GART_IOMMU support
For the past several weeks I had a strange problem. Sometimes when I booted my computer, it would refuse to start the X server and would give the following error in dmesg:
NVRM: not using NVAGP, kernel was compiled with GART_IOMMU support!!
NVRM: failed to allocate stack!
The weird thing about it is that normally if I rebooted the computer it would magically work again. So this error only showed up once-in a while and seemed to disappear at will. Today, it happened again, so I decided to fix it.
Read the rest of this entry »
usb 1-4: device descriptor read/64, error -71
When I try to connect my Sansa Clip MP3 player to the linux box I see the following error in dmesg:
usb 1-4: device descriptor read/64, error -71
and the device recognition fails. The player’s battery gets reloaded but I can’t mount it and transfer songs.
Read the rest of this entry »
Notes About Using amsmath split Environment In Hebrew Documents
Recently I’ve worked on a Hebrew document in LaTeX and wanted to use the split environment to typeset some multiline formula. The document which compiled just fine till that point, failed to compile with the following error:
Package amsmath Error: \begin{split} won't work here.Resolution Problems in clock()
While playing recently with clock() in order to time the performance of different kinds of code and algorithms, I found an annoying bug. clock() just can’t register work that has taken less than 0.01 seconds. This is pretty unexpected as clock() should return the processor time used by the program. The man page for clock() states:
The clock() function returns an approximation of processor time used by the program.