Saturday, November 24, 2018

permissionerror: [errno 1] operation not permitted: 'lib' ->

In today's episode of dumb shit that made me write a blog post...

I finally got around to trying to figure out why I couldn't create a virtual environment (venv) using Pycharm for my Python class project folder.  I keep it on a USB drive because I do some work on it both at home and on my work laptop (when I'm not working through lunch, natch.)

Anyway, I kept getting the following error:  permissionerror: [errno 1] operation not permitted: 'lib' -> (and then the path to a symlink to lib64.) 

I figured it was an issue with my locked down work laptop, so I just kept manually navigating to a local python interpreter at work.  I said I'd get around to fixing it when I got home.  But low and behold, same shit at home. 

I tried manually running the command that PyCharm uses so that I could "sudo" it (thinking it was a permissions error.  That simple solution, of course, wasn't the issue.

The error is ACTUALLY caused by the fact that my USB drive was FAT32.  For some reason (beyond my knowledge level) you can't create symlinks using FAT32.  The fix is to reformat your drive into something that's a little more modern.

Since I need to use this drive on both my work machine (Win10) and home (Debian), I went with NTFS.  Wango, bango I was able to install the new venv on the USB drive on the first go after I had reformatted the drive.

Luckily, I had recently started using a sync tool called Unison to keep my USB drive synced up with my desktop due to a catastrophic loss of my drive data (during Finals week of my last Python course) that was caused by my wife putting a little percussive force on the door of my desk while trying to move a carpet.  Snapped a few pins off of the drive connection to the board that my shitty, shitty soldering skills couldn't fix.  But, it had the positive effect of getting me to finally start backing my shit up properly, haha.

So, if you too are having a problem setting up a venv on a thumb drive, fix that FATfuck32 drive and you'll be ready to rock.

Monday, July 30, 2018

Converting Picasa XMP Face Tags to Usable Exif Metadata Tags

Is this the future?
2022 already?

I guess I finally broke the delayed post pattern now that I'm finally finding a good use for this thing--psuedomemory for the technology shit I always forget about.  I spend half my life trying to Google shit I Googled five years ago (and again three years ago, and again eighteen months ago...)  Bookmarking pages hasn't really done me any good, because I forget that I bookmarked a site (and also because there are times I find the bookmark, but can't remember why I saved it, haha.)

So today's episode of "Chris' only reason to post an entry on this elderly blog" is brought to you because I have like 15,000+ pics that aren't really organized.  Back when I used Windows, Picasa made things easier because of the face tagging technology.  If you wanted to find a pic of a certain person, you could just click their name and voila, you were good to go.

However, Picasa typically writes those tags to an internal DB and not to the images themselves.  There's a way to get Picasa to do that, but it writes them to a weird XMP field that isn't typically used by any other photo organizer.

I'm using Debian and GNOME as my desktop environment, so I'm using the default image manager that comes with the distribution.  Unfortunately, it does not use XMP tags for organizing or searching, so I was basically stuck trying to find some way of migrating those Picasa XMP face tags (mwg-rs: Regions/ mwg-rs:RegionList[1]/mwg-rs:Name) into something that another application could search.

The solution is actually really easy to use, but the hard part was actually finding it!  Google searching was a little wonky and the results weren't all that clear.  I finally found this post in the Exif forum, but if you didn't phrase your search terms precisely that way, you'd never find it.   Here's my useless search history:

shotwell search xmp
mwg-rs:Name to exif tag
linux photo program that can read xmp face
how to search xmp tags 

The post I linked to above was exactly what I needed and it actually was super easy to do.  It's literally one line, assuming all of your photos are in a hierarchical directory.

Here's a video walk-through of how to make that happen:

It only took around 20 minutes to run through about 17,000 files in 254 directories.  Not too shabby!

Here are some links to the stuff that powered today's post (all excellent, Open Source projects)

ExifTool by Phil Harvey- "a platform-independent Perl library...for reading, writing and editing meta information in a wide variety of files."

Shotwell- A digital photo organizer designed for the GNOME desktop environment.

Kazam Screencaster- The screen recording software I used to record the above video.

Monday, July 23, 2018

ComicTagger Error StrpTime

Long time, no see/speak/etc.    You can thank an annoying, seemingly obscure technical problem I ran into for breaking my 42 months of blog silence.  These hiatuses (yatus #bigbrother) seem to be getting longer and longer over the years.

So anyways, I decided to try to organize my electronic comic book collection yesterday and installed a program called ComicTagger, which helps grab and write metadata for comic books.  

I get it installed and ran into my first problem right off the bat.  The application wants you to put in the path to WinRar (or any RAR/UnRAR program) but the little tool you use to navigate through your filesystem doesn't actually navigate anything.  It'll open the box and show you your root folder, but none of the contents.  The workaround for that was to just manually type in the path.  Since I'm running Linux, my path was "/usr/bin/rar" and "usr/bin/unrar"

Problem solved!  Let's get to tagging comics!  I drag and drop a file over to test and wait.  And wait.  And wait some more.  The dialog box that popped up is just sitting at 0% for a few minutes before I realize that there's an error in the terminal window and I'm stuck.  Here's what I see:

Traceback (most recent call last):  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/", line 540, in dropEvent    self.fileSelectionList.addPathList( self.droppedFiles )  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/", line 196, in addPathList    row = self.addPathItem( f )  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/", line 271, in addPathItem    if ca.seemsToBeAComicArchive() :  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/", line 618, in seemsToBeAComicArchive    ( self.getNumberOfPages() > 0)  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/", line 775, in getNumberOfPages    self.page_count = len( self.getPageNameList( ) )  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/", line 751, in getPageNameList    files = self.archiver.getArchiveFilenameList()  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/", line 395, in getArchiveFilenameList    for item in rarc.infolist():  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/UnRAR2/", line 127, in infolist    return list(self.infoiter())  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/UnRAR2/", line 122, in infoiter    for params in RarFileImplementation.infoiter(self):  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/UnRAR2/", line 171, in infoiter    data['datetime'] = time.strptime(fields[2]+" "+fields[3], '%d-%m-%y %H:%M')  File "/usr/lib/python2.7/", line 478, in _strptime_time    return _strptime(data_string, format)[0]  File "/usr/lib/python2.7/", line 332, in _strptime    (data_string, format))ValueError: time data '2006-03-29 18:32' does not match format '%d-%m-%y %H:%M'
The highlighted section is the actual error.  There's nothing about this on the project Github site, the Google site the code was originally housed on, or the application's web forum.  NOTHING.  There is literally one post on an Ubuntu forum where a dude asks about the issue in 2016, but no one ever responded!  And if he ever discovered the fix, he didn't post it in that thread.  DON'T EVER DO THAT.  If you fix your own problem, update the fucking thread!

Anyway, I DID figure out a fix and I decided to post it on my blog, so if anyone else runs into the problem, it's a 30 second fix and not hours of googling like a moron (me!)  I should've just sat down and worked through the problem like I finally did this morning. It took me about 45 minutes and 25ish minutes of that was trying to find and install a text editor that had line numbers on it, haha.  I tried Sublime and it wasn't.  Now I know why the editor war has been ongoing for over 30 years.

In this case, ComicTagger is choking while trying to strip out and reformat the date it finds in my CDisplay RAR Archived Comic Book (CBR) file.  It looks like the (or A) programmer hardcoded the date format as %d-%m-%y %H:%M, which is Day-Month-Year (two digit) Hour:Minute (Military format.)  However, it looks like the file date that was getting pulled from my CBR files were in YYYY-MM-DD HH:MM. The strptime Python module was throwing up an error because the date that was getting passed to it wasn't matching. 

Here's the fix:  I went into /usr/local/lib/python2.7/dist-packages/comictaggerlib/UnRAR2/ and edited line 171 to reflect the actual format that was needed:

data['datetime'] = time.strptime(fields[3]+" "+fields[4], '%Y-%m-%d %H:%M')
There you go.  Now I've wasted another 90 minutes writing this up. I hope you appreciate all that I do for you!

See you in 2022, bitches!

Tuesday, January 6, 2015

Automatically using the Multipurpose Feeder on a Dell B2360DN Printer

Why is this like sacrificing a goat to an angry and judgmental dark lord?  All I wanted to do was be able to print stupid UPS shipping labels without a lot of hassle.  I want the print from the Multipurpose Feeder if there's something in the slot, but from the tray if not.  Automatically.  But, the default setup on my Dell B2360DN printer makes that impossible.  Sure, I could just load up my Tray 1 with all those free, delicious UPS labels, but then I still have to manually tweak something when I send a regular print job.  
RTFM?  Not anymore.  Dell's documentation is shit.  But it can be done! It’s a multi-step process that I’ve pieced together from a few different forums and a bit of dicking around.
After these changes, I can now just send a print job to the printer and unless I shove something into the Multipurpose Feeder (MP Feeder) it’s going to route out of Tray 1.  If I want to print one of my UPS labels, I just stick it in the MP Feeder and the B2360DN will THAT instead of the paper out of Tray 1.  You know, like pretty much every other printer I’ve owned has done out of the box.  But no judgments, Dell.
  1. Front of B2360DN
    Change the default MP Feeder settings in the Diagnostic Menu:
    1. Power off the printer
    2. Hold the OK and left arrow key
    3. Switch the printer on
    4. Release the keys once the amber light comes on
    5. Scroll through the Diagnostic menu using the right arrow.
    6. Select Printer Setup
    7. Select ENGINE 2 (push the right arrow 5 times to reach this option)
    8. Change ENGINE 2 setting to 8* and press OK
    9. Press the return arrow key to return to the Diagnostic Menu
    10. Press the left arrow to select EXIT DIAGNOSTICS
    11. The printer will reboot
  2. Change the Default Source and Paper Type for the Multipurpose Feeder
    1. Press the Wrench key to reach the Admin Menu
    2. Press OK to reach the Paper Menu
    3. Press OK to select Default Source
    4. Press the right arrow to select MP Feeder and press OK
    5. Press the right arrow to reach the Paper Size/Type Menu and press OK
    6. Press the right arrow to select MP Feeder Size and press OK
    7. Select Letter and press OK
    8. Press the right arrow to select MP Feeder Type and press OK
    9. Select Plain Paper and press OK

Friday, February 8, 2013

Tuesday, May 15, 2012

Oh, Good For You, Christian Bale. Good. For. You.

Ever since Christian Bale went batshit crazy on the set, I like to be obnoxious with my wife and drop the "Oh, good for you!" line as much as possible.  I keep saying I want to use it for her text tone, but I can never find a clean copy of that stupid thing!  Every "Good for you" drop/tone/ringtone I've found has either been on a soundboard and you can't download it, or it's in Flash (same problem.)

Luckily, I found a clean, MP3 version of the Christian Bale rant today online (link added for your convenience.)  Through the powers of Audacity (a bad ass bit of shareware, if I do say so myself) I extracted that magical bit and made it into an iPhone formatted tone (M4R.)  For those of you that play with other phones, I've did an MP3 version too.

Enjoy, mofos!

Christian Bale "Oh Good for you!" iPhone ringtone

Christian Bale "Oh Good for you!" Mp3 format

P.S--don't be scared of the URL--that's mine.  I couldn't pass up an awesome domain like that when it was suggested by the registrar a few years ago.  I use it for a picture blog ( but it's not updated often.

Wednesday, January 12, 2011


Obviously, I've been a fat mofo for quite a while. This blog is the bastard stepchild of a blog I started back in July 2005 to document my fight against my fatty fatty two-by-four nature. A fight that continues, my fine friends.

I hit my highest weight EVER in December 2010 (or the highest recorded weight, that is--it doesn't count if it's not documented) when I entered a weight loss competition with some of my coworkers. Sadly, I lost (blame it on the fact that we started in December; blame it on the fact that I was in New Orleans constantly the eight weeks we tracked our shit; blame it on the rain, yeah yeah; blame it on the ah ah ah ah alcohol baby).

I lost a WHOPPING 10.5 pounds. Boo. Hiss.

Fast forward to June coworker (now my boss) decided she needed some motivation to shed a few pounds before her trip to Italy, so she kicked off a Biggest Loser Part Deux in the office. Eight weeks. Eight contestants. $800 on the line. (I'm a shitty story teller, so I'll just blurt out the fact that I handily won that bitch).

Imagine my surprise when I weighed LESS at the start of this comp than I did at the END of the last? By almost 10 pounds. W00T! I have no idea how it happened, as I wasn't really dieting. I slacked off a LOT since then (for a few reasons that I'll get into in a sec), but now that the holidays are over, I'm back to being a diet and exercise Nazi as of 1/3/2011. I'm down about 5 pounds since then and I think I'm off to a good start.

You want in? You know you are some of the tools that I've been using. They seem to work for me:

  • started using this site because they had a decent iPhone app (and yes, I'm back to the iPhone--the 3GS is like a bajillionty times better than Android) that made tracking my food super easy. I've sadly discovered that unless I'm crazy ass OCD about tracking what I eat (and talking about it incessently with Laurie), I start to drift off into picking up breakfast tacos on the way to work; eating double bacon cheeseburgers at lunch; "snacking" on a McDouble AND a fucking McChicken on the way home BEFORE dinner YOU SAD FAT MOTHER FUCKER. In the few months I've used it, they iPhone app has been updated to be even more user friendly. I've tried a couple of other apps (like Sparkpeople) but they are as slow as a stoned turtle fucking.
  • Runkeeper (iPhone app)--I had planned on running a few days a week to build up to a 5K, but then I not only pulled my right hamstring (Octoberish?), I pulled the left a few weeks later and THEN did something to my left Achilles Tendon (or possibly fractured my left heel bone--can't say for sure, because I still haven't gone to the doctor, but I'm leaning towards a strained AT). while using a mother fucking jump rope of all things Runkeeper is the fucking bomb for tracking that shit, with integrated GPS that feeds into a map. What I like about Runkeeper is that you can also use it to track bike routes too.
  • website to learn about fitness and nutrition (but take everything you read with a grain of salt, especially in the forms). Lots of example videos, which is helpful when you're trying a new split and you have no fucking idea what a Pec Dec Fly is.
  • great site to with tons of exercise examples.
  • Digital Kitchen Scale--get one. You need it. Seriously.
  • Jack3d--The label calls it a "pre-exercise CNS-Carnosine-ATP Augmentor". It's a pre-exercise supplement with creatine (rebuild muscles faster) that increases nitric oxide levels (pumping up your muscles) and doubles as an energy drink (much like crack or meth--the shit is potent, yo).
  • Optimum Nutrition Gold Standard Whey Protein (Rocky Road flavor)--I am so mother fucking tired of this flavor. Ugh. I'm getting strawberry next time. Whey protein is a must if you're going to do any strength training. Drink a shake within 30 minutes of completing your workout--again, helps the muscles rebuild faster. I stick with whey only right now since I'm trying to lose weight, but there are other types of proteins out there that are digested more slowly that I'll add when I get into some type of maintenance mode.
I fucked around after August (and the injuries in October screwed up my fitness shit for a couple of months) and gained a few pounds back. Since June 1, I'm down 30 pounds...starting with my 12/2010 weight, I'm down 49 pounds.

I'm still a fat mofo, but not as bad as I was (and not as MUCH as I thought). The trainer at our work gym did a body fat caliper test on me in November and based on that, I'm actually at the tail end of the "normal" range with 22% body fat.. My pants beg to differ, but I'll take what I can get.