Attribute weight ' ' is not valid

Project:Product import via CSV using node_import
Component:Code
Category:
Priority:normal
Assigned:Unassigned
Status:active
Description
Project: 
node_import_uc_product

When trying to import, I get the following error:

"Can not import this node. Check following errors:
* Attribute weight '' is not valid. It must be a number."

I am using a Tab-separated file, PHP5, and am not mapping any columns to product weight. Is weight a mandatory item?

Version: 
Ubercart 1.0
goodeit's picture
Offline
Joined: 05/28/2008
Juice: 322
Re: Attribute weight ' ' is not valid

After looking at the code, it looks like in a couple of places the weight is checked (to make sure its a number, to make sure its >=0). This could possibly be modified to default the weight to 0 by adding

else if($node->weight == '')
$node->weight = 0;

I'm no PHP whiz (by any stretch), but it worked for me. Now if only I knew how to make a patch or diff thing...

EDIT: looks like you fixed it, thanks a bunch!