Drupal feed import file error 1002 1003 401

I know, cryptic post title and definitely non-standard content. But I spent more time than I should have banging my head against this problem so I thought I’d write it up in the hopes that it helps at least one other person.

Here’s the situation. I has a CSV file full of data that I wanted to import, as nodes, into a Drupal site (in this case, Drupal 7) using the Feeds module. One of the pieces of data for these nodes is a PDF file, initially represented in the CSV file as “file name.pdf”. I’d read somewhere that if I put this PDF into whatever folder Drupal expected files to be in, for example /sites/default/files, then the Feed import would automagically see the file and it would be added to the node in the appropriate field. Needless to say, this didn’t work and resulted in a 1002 error and a message in the log saying something about a download failing.

So I went about trying various other values for the filename in the CSV file: “sites/default/files/file name.pdf” and “/home/gburnham/www/sites/default/files/file name.pdf” and even “C:\Users\Greg\Documents\import\file name.pdf”. No joy. I tried replacing the space with %20, not having a space at all. Nothing would work.

But something about the log message about failing to download the file was nagging me. Was Feeds expecting a URL there for the file? Could it be that simple? So I uploaded the files to a server, changed the CSV file value to “http://example.org/files/file name.pdf” and voilà, the node in question was updated and the PDF file was right there in its field as expected. Finally.

So there you have it, looking to import nodes and include files? Remember that the Feeds module is expecting to be able to download the files from somewhere. It’s not a lesson I’ll soon forget.

Oh, and one thing to mention. The import process renamed the uploaded file. Rather than the original “file name.pdf” it became “file_name.pdf”, so if the original name is important to you, you may want to look deep into the module code itself.

And this write up obviously is dealing with importing via CSV. I haven’t tried importing from an XML file but my initial suspicions would be that the behaviour is the same.

Month in Review – July 2014

So, yeah, July. Knee Knacker. That was, um, something else, no doubt.

It got hot this month, as it is wont to do in July. So I’ve been able to get in a fair bit of heat training for the Portland Marathon (word is, it got up to 25 degrees on race day a couple of years ago, surprising for October.)

I realized this month that, given my recent weight-loss and my desire to keep that weight off, I should be tracking those numbers on a regular basis too, so from now on my monthly recaps will include my most recent weigh-in which will usually be from the preceding Wednesday evening.

The numbers:

Distance: 301k
Time: Almost 29 hours
Calories: 17k
Climbing: 5536m
Weight: 183.2

Oh yeah, no races for me in August! Just long runs in the hot-hot-heat.

Photo Essay: If I Knew You Were Coming, I’d’a Baked You A Cake

A few months ago the wonderful Gillian tweeted about making a rich, gluten-free, quinoa-based chocolate cake. I asked for the recipe which she provided and I promptly forgot to bookmark it.

When we decided to host my brother and his family for his birthday I figured this would be a good time to make such a thing and did a little searching and found that there was a striking similarity between the various gluten-free, quinoa-based chocolate cake recipes I could find. That is, they were all based on the recipe in Quinoa 365 by Patricia Green and Carolyn Hemming.

For clarity’s sake, I used this recipe. Enough words, to the pictures!

Line your pans with parchment

Line your pans with parchment

Get your blend on

Get your blend on

More blending

More blending

Dry ingredients

Dry ingredients

When wet meets dry

When wet meets dry

Ready for baking!

Ready for baking!

Starting on The Frosting

Starting on The Frosting

Chocolatey Base

Chocolatey Base

MORE Butter and Sugar

MORE Butter and Sugar

The recipe made about twice as much as was needed.

The recipe made about twice as much as was needed.

Homemade Spicy Tayberry Jam in the middle

Homemade Spicy Tayberry Jam in the middle

One more step to go....

One more step to go….

The En-Frostening!

The En-Frostening!

Would you believe I forgot to take a picture of the completed cake?!?!?!

Would you believe I forgot to take a picture of the completed cake?!?!?!

Race Report – Knee Knackering North Shore Trail Race

Getting There

Always do something new on race day, right? Because of the logistics of getting to Deep Cove to catch the shuttle to the start line, I decided to try something new. I got up at 2 AM and had some oatmeal and then went back to bed for a little over an hour, getting up at 3:30 and heading out to pickup my Zip Car and drive over to the North Shore. I ate a banana and a Clif bar on the way and drank some tea. Arriving at Panorama Park with enough time to hit the washroom (big thanks to the park’s caretaker, José, for opening the washrooms early every year so us Knee Knackers don’t have to pee in the bushes!) before boarding the bus.

I ate a pack of Honey Stingers and sipped my Gatorade/Nuun mixture as we drove to the start. Trying to relax and not obsess about the climb up Black Mountain that I would be facing soon, just listening to the conversations going on around me.

We got to Nelson Canyon maybe half an hour or so before the start. Right away after getting off the bus I saw Dianna, checked in and left my drop bag in the truck, then got in the bathroom. With that taken care of, I sent a last text to Siobhan turned my phone off and stashed it away. Quarter to, take a gel, top up my bottle with water.

Chatted with Tom real quick, then hung out with Karl at the front of the pack before moving further back once we were 5 minutes out. And we were off.

Swapping Goal Times With Karl

Swapping Goal Times With Karl
Photo Credit: Ken Blowey

The Race

I’d come out for one of the official training runs two weeks previous, and that had covered the first half of the course so I had a good idea what the next 4 hours had in store for me. As for the second half of the course, I’d run most of that before, bits and pieces of it are on the Iron Knee course and I’d done a few other runs out there as well.

But right now, it was all about climbing. From the start to the first aid station it’s a little over 5 miles (8 km) and in that time we climbed over 3400 feet (just over 1000 metres, or a Vertical Kilometre.) It was during this section that I had my slowest kilometre split – 31:57, this had 450m of ascent. As the aid station atop Black Mountain neared, I could hear classical music (or classical-ish music, I’m no connoisseur) and sure enough there was a cellist there with the entire aid station (5.1 miles) crew decked out in formal wear. Surreal. But no time for a waltz, a quick water refill and get a move on.

The rock slab

The rock slab
Photo Credit: Karen Chow

Eagle Bluffs

Eagle Bluffs
Photo Credit: Herman Kwong

Descending now – down the section that I so loathed on the training run two weeks previous, switchbacks made up of crushed rock, with lots of pointy bits. But like the climb, this didn’t seem nearly as bad and in no time I was at the Cypress aid station (7.5 miles – timing mat here, 2:01:16) for another water refill, a gulp of coke, and some food. Then onward.

Descent

Descent
Photo Credit: Nora

Coming into Cypress

Coming into Cypress
Photo Credit: Jay Klassen

Some more climbing then more descending and pretty soon it’s the Hollyburn Lodge aid station (10.2 miles) about a 1/3 of the way through the race. I’d printed up a cheat-sheet with the relative and absolute distances of the aid stations, so I’d have an idea as where I was but I’d forgotten it at home. Of course, if I had been paying attention, I would have noticed that each aid station had a sign which said how far into the course we were, how far was left and how far to the next aid station. Oh well.

Dam!

Dam!
Photo Credit: VFK

I did know that the next station was going to be Cleveland Dam, and that most of this next portion was pretty runable so I got to it. It seemed like no time until I was crossing various roads in the British Properties (on the training run, Dave had pointed out a street sign with glee “Look, Barnham Road!”) At one of the street crossings the course marshals had set up a mini aid station with, oh so wonderful, cherries. Delicious. Then it was back into the woods on the west side of the dam and then crossing the damn and the noise and bustle of the aid station (14.8 miles – timing mat here, 1:38:50 [3:40:06 total]) with the always enthused Eddy. Used my dropbag to change my shirt and hat, refilled water, drank some coke, ate some food, and grabbed a freezie for the walk up Nancy Greene Way to Grouse.

Up Nancy Greene Way, up the BP trail, Up and up and up. While this was slow going, I’d gapped the two guys who’d entered BP with me, and passed a couple of more. There were a few people I’d been yo-yoing with for most of the day and I figured that would continue. Then the Skyline Drive aid station (17.7 miles) for another water refill.

It was just more keeping on, as the Mountain Hwy (20.4 miles) came and went and then the route followed the river for a bit. I’d been hoping that the river would provide a bit of a cooling breeze, but instead it was more of humid, sticky wafting of air. Did I mention it was a hot day? So very, very hot.

Then it was the LSCR aid station (22 miles – timing mat here, 2:07:38 [5:47:44 total]) were I spent more than a few minutes stuffing my face and rehydrating. I knew the somewhere up ahead was the Seymour Grind and I was not relishing climbing it.

This next portion is a bit of a haze – there was the Lillooet Road (23.7 miles) and Hyannis Drive (24.8 miles) aid stations, one of which had Snow White and various dwarfs, and some crazy steep stairs.

But after Hyannis was the Grind. It was a steady climb to get to it – I kept thinking, am I on it now? Is this is? – but there was no mistaking it once it started. I recalled RD Kelsy Trigg saying at the briefing the night before that it wasn’t as bad as the Grouse Grind and it was only 20 minutes out of your life. That was quite the 20 minutes. But the trail after that was very runable and pretty soon there was the final aid station, Mt. Seymour Road (27.5 miles.)

Heading To The Finish

Heading To The Finish
Photo Credit: Salvador Miranda

A short stretch on trails, then it was Indian River Road and then the final section with all it’s stairs and bridges and oh so many hikers. Here I caught up with a trio in front of me which included local legend Ean Jackson and two women, Christine Chore and Janet Schonerville, who I’d been swapping places with all day. We burst out onto Panorama Drive together and I pushed hard for the final section, crossing the finish line in just under 8 hours.

Crossing the line

Crossing the line
Photo Credit: Mike Jones

Official Results: 7:57:35, 100th out of 192 OA, 28th out of 42 in my AG, 68th out of 120 men.

The Aftermath

It isn’t up anymore, but Ultra Signup projected something like 8:09 for my finish time. Previously I’d never actually hit their projection so obviously I was very happy to have squeaked in under 8 hours this time. Not that this race didn’t take its toll.

Totally Knackered

Totally Knackered
Photo Credit: Jan Heuninck

One of the interesting sets of stats that Knee Knacker provides is your place at the timing stations. At Cypress I was in 107th and I held at 104th for Cleveland Dam and Lower Seymour Conservation Reserve. Given how often it seemed like I was being passed in the last quarter of the race, I’m surprised I advanced 4 positions (granted, 3 of those were in the last couple hundred metres) Another great stat is their temperature / median finishing times – maybe if it had been cooler I could have knocked some time off!

Giving Thanks

So many people to thank – first and foremost to Siobhan for her unwavering support and encouragement. I doubt I’d be a runner at all were it not for her early influences. Big thanks to my steadfast sponsour, Powered By Chocolate Milk, who greatly ease recovery. Thanks to Dave for coming out on the training run with me and ensuring I didn’t get lost (except that one time we took a wrong turn.) And to everyone else at the Broadway Run Club for their help. Finally to all the other Knee Knackers – the myriad of volunteers who hauled water and supplies and cameras, who set up tables and sliced fruit and laid out plates of cookies and chips; who handed out medals and cheered; who organized and planned and meticulously executed the plan – to all the other racers, those ahead of me who made me push that extra little bit and those behind who kept me going. Thank you, thank you, thank you all.

Month in Review – June 2014

Well, is there a better way to start off a month than with a new marathon PB? Nope, don’t think so.

Once recovery from the marathon was over, it was back to training for the Knee Knacker on July 12th. While I didn’t get out to the trails as often as I probably should have, I did end the month with a 4 hour, 22k training run covering the first half of the course. This run involved climbing Black Mountain which included a kilometre split of 31 minutes (over 450m of climbing right there) and required a full litre of Chocolate Milk when I got home.

The numbers:

Distance: 331k
Time: Almost 32 hours
Calories: 17k
Climbing: 5600m

Race Report – Scotiabank Calgary Marathon

Between the potential heat and the elevation, I was a little worried going into the Calgary Marathon. But it has an early start so even if it gets hot, it should be too bad by the time I finish. Racing a marathon at an elevation of 1000m though, this would be a new experience.

I was up at 5AM, trying not to disturb Siobhan too much. Had my oatmeal and some water with Nuun and was out the door shortly after 6. It was a quick walk to the Start line at the Stampede Grounds, one of the factors that influenced this choice of hotels. I was early enough that I didn’t have to wait for the bathroom, so I took advantage of that right away. I had a little time to kill, so I found a spot in the sun – it was still a bit cool – and tried to relax.

Pretty soon I was heading over to the start line, where the 3:30 pacers should be at the front of Corral B. But there were no pacers in sight yet. Although I did see Morteza and Steve, and soon enough Melissa and Emma came bounding by. In short order we were aurally assaulted by Greg’s cowbell, not to mention the visual of his near-daisy-dukes and scoop-neck top. And then there was Alan and the other 3:30 pacer and we all squeezed into the front of the corral just in time to see Dave working his way to the front of Corral A.

An instrumental version of the anthem (really, they couldn’t hire a singer?) and we were off! It was fairly crowded the first couple of k, I keep losing sight of Alan only to see his ears just up ahead or just off to the side. As we ran past the zoo I started to pull ahead of him and kept gaining as the distance clicked by. Around 8k we passed within a block of the hotel, and Siobhan was there cheering me on. Most of the next 5 k or so was spent climbing. Well, not really, but it was in this section that we had our most significant elevation changes, hitting the peak just after Mount Royal University, right around the 20k mark. It was during this section that I had to stop at a bathroom, and as I came out of the port-a-potty I saw Alan run by, so I took off to catch up and stay with him (the 20-25k split averaged 4:49, tying with 5-10k for my fastest.) Pretty soon we were crossing the Bow River again and dropping down to Memorial Drive and starting on the dreaded out-and-back. Almost right away, probably km 29, I saw the lead woman heading the other direction (she was probably at km 37.) The good part about Memorial Drive is that most of it is along the river and we had some cool breezes, the bad is that OH MY GOD IS THIS NEVER GOING TO END WHAT DO YOU MEAN I HAVE TO RUN ALL THE WAY BACK TOO! So yeah, tough portion of the race. I was determined to stick as close to Alan as I could until at least the turn around, and I was probably within 200 metres of him at that point, but he was steadily disappearing into the distance. I was starting to feel some pre-clamp twinges in my calves, and oddly felt glad that they’d held off this long. Around 39k I could see there was a bridge coming up, and it looked like quite the climb. But these sneaky Calgarians have a secret sub-bridge that required almost no climbing at all. Ah bless.

A few more twists and turn and then we were back on the Stampede Grounds and I was passing the 42k marker and damn if both of my calves didn’t seize up right then and there, forcing me to stop and stretch them out. But it was a quick stretch. As I rounded the final turn I could see the clock was almost at 3:35, so I knew I had to push. I crossed the finish line at – gun time – 3:35:23 and knew I was sub 3:35. A 5 minute PB over Sacramento.

Official Results: 3:34:46, 181st out of 1617 OA, 144th male out of 940, 25th out of 126 in my AG. Average pace was 5:06/km. I’m really hoping to break 5 minutes in Portland (a mere 117 days from now)

post-race

The weather proved not to be as much of a factor as I’d feared. Sure, it got warm, but it didn’t get hot. And they has sponges at most of the aid stations which were really appreciated. As for running at elevation? I can’t say I really noticed it. I don’t think it had much of an effect on my race, but maybe if this had been at sea level I would have stayed with Alan all the way.

Weight Loss Plan

A couple of years after I quit smoking I was talking to a friend about it and I said that quitting is very simple but it certainly isn’t easy. Since then the difference between “simple” and “easy” has further solidified for me.

Quitting smoking: simple, don’t have another cigarette.

Running a marathon: simple, just keep putting one foot in front of the other until you cross the finish line.

Losing weight: simple, burn more calories than you consume.

But goddamn none of these things are easy.

So yeah, I wanted to lose some weight. I had a great race in Sacramento and want to do better in Calgary. If I’m hauling less weight then I should be able to run faster, right? PBing at the Sun Run and the BMO Half Marathon indicate that I am on the right track. After Christmas I had the Orcas Island 50k coming up and I knew it wasn’t an ideal time to cut back on my caloric intake. Once that race was out of the way I stepped on the scale: 200.3 pounds (February 5th). Clydesdale territory. Ok, I want to be down to 180 by the Calgary marathon, 16 weeks away.

On May 7th (13 weeks) I was 179.8 pounds. 20.5 pounds lost.

Weight Net Loss Gross Loss
200.3 - -
Week 1 196.4 3.9 3.9
Week 2 195.5 0.9 4.8
Week 3 193.0 2.5 7.3
Week 4 193.8 +.8 6.5
Week 5 191.7 2.1 8.6
Week 6 189.5 2.2 10.8
Week 7 189.0 0.5 11.3
Week 8 186.0 3.0 14.3
Week 9 187.1 +1.1 13.2
Week 10 185.9 1.2 14.4
Week 11 183.3 2.6 17.0
Week 12 180.7 2.6 19.6
Week 13 179.8 0.9 20.5

I saw a formula somewhere that said, for a marathon, you lose 2 seconds per mile for every pound shed: 20 pounds is just shy of 18 minutes. If this is true then my 3:39 in Sacramento  would drop to a 3:22 in Calgary. That seems a little overly optimistic to me. My plan for Calgary is to run with the 3:30 pacer for as long as I can – I stayed with the 3:30 for the first 32k in Sacramento, so hopefully I can hold on for longer this time, or at least not blow up as badly for that last 10k.

So, goal one is achieved, I’ve lost 10% of my body weight and am lighter than I have been in decades. But now comes the maintenance mode. Growing up my Mom was constantly dieting – usually Weight Watchers but I remember seeing lots of other diet books throughout the years – and invariably regaining the weight when she stopped. My plan with this weight loss wasn’t to follow a formal diet, but rather to make long term changes to my eating habits.

At least in maintaining my weight, I can eat a little more than when I was trying to lose.

Race Report – BMO Marathon Half 2014

Looking back over my race results, it’s been over a year since I last ran a Half Marathon (the First Half) and a full three years since I last PB’d (BMO in 2011)

The half had an early start – 7AM, so I was up shortly after 5 and had some oatmeal and tea. Queen E park is a little over a mile from home, so at 6:30 I headed out and took and easy run up there. Then there was the formidable lineup for the port-a-potty (not wanting to make my Sun Run mistake again). It was just a couple of minutes to 7 before I got out of there and I hustled over to the corrals. I squeezed into the very back of the yellow corral just as they started the anthem – not an ideal placement but the best I could manage.

Then the blast of an air horn and we started moving forward. As we crossed the timing mat I looked over at the clock, a minute 25.

We were jam-packed heading down Midlothian/29th and it didn’t let up once we turned onto Cambie. I did what I could to move forward, but it was slow. As we were crossing the bridge I passed Morteza and Fariborz, both looking strong. Shortly after that I passed Brian, the 1:45 pace bunny, and his crew, which shows how far behind I was. Pretty soon I hit the 5k mark and I took a split on my watch – 22:49. I was running late. I needed 22:30 for each 5k to meet my goal, so I’d better pick up the pace. Next we were running through the eastern part of Downtown and Yaletown. As we passed the Roundhouse I had visions of the First Half of years gone by. Under the Granville and Burrard bridges and to the 10k mark. 22:58 – so much for speeding up, I’d slowed down by 11 seconds. Looks like I wasn’t going to be hitting my goal but I was still well on the way to a PB. Oddly, the “Half Way” sign seemed to be less than the 550 metres past the 10k, and at that point my watch was reading just over 47 minutes … so, still on target for my goal? Maybe? Perhaps some of the Seawall kilometre marker gremlins had been at work here too.

Past the West End and into Stanley Park. It’s weird to be running in the park and not be on either the Seawall or the trails. Just after Second Beach I passed the Gingerbread Man (so much for not being able to catch him), then we ran past Lost Lagoon and started up Pipeline Road. It was along here we hit the 15k point – 23:10. Yup, giving up all hope of breaking 1:35. Then a sharp right and we were heading East on the road. Finally dropped down to the Seawall – much later than I thought we would – as we moved through Devonian park and into Coal Harbour. Either I missed the 20k sign, or they didn’t bother to have one because next thing I knew we were passing the “1 Km to go” sign.  Around the corner onto Georgia and then veering onto Pender for the push to the finish line. The final 6.1k was 27:09.

While I didn’t hit my sub-1:35 goal, I’m very pleased to have a 3 minute PB. Now it’s full steam ahead to the Calgary Marathon.

Official Results: 1:36:06; Overall 342 out of 7887; 273rd out of 3837 men; 32nd out of 431 in my AG.

There’s No Place Like Home

Typically in sports having the Home Advantage is seen as a good thing. And while he didn’t win the Sun Run, it looks like Dylan Wykes enjoyed an advantage over all-but-one of the other Elites (not to mention that 6 of the top 15 finishers were from the area).

At our clinic wrap-up dinner, one of the first-timers asked me what my typical pre-marathon Saturday was like. When I run a hometown race, I do as little as possible. Not much more than sitting on the couch and watching movies or playing video games. But when I travel for a race, then I’ll usually spend a few hours walking around and checking out the city I’m in.

I was thinking about this again the following day and realized that of the 7 road marathons I’ve raced, the ones I’m happiest with have been out-of-town. The first time I’ve ever felt good at the end of 42.2 (well, 26,2 because ‘Merica) was in Seattle. And then back-to-back in late 2013 with Victoria and Sacramento. All three of those races set PBs and in each of them I spent a not-insignificant amount of time walking around the day before.

I’m no scientist, but I do know that correlation is not causation so I can’t unequivocally say that my walk-abouts gave me better races. But I’m going to take this information with me to Calgary and you can be sure that I’m going to spend some time wandering around the day before the marathon. Calgary Zoo anyone?