“Variant Weight Unit is invalid”, and the weight behind it
Variant Weight Unit is invalid
Two separate columns, two separate mistakes. The unit column rejects anything outside a four-item list; the weight column accepts almost anything and quietly stores nonsense.
Why Shopify raises it
Shopify splits weight across two columns, and its product CSV reference defines them differently.
Weight value (grams) is the stored weight, and the reference is unusually direct: “You should specify only the numerical value, without the unit of measurement or decimals.” Its own examples are “5.125 kilograms, enter 5125” and “for 4 pounds, enter 1814”. It then adds the line that explains why this matters: “The default value is 0 if no value is entered. Use accurate weights if you use carrier-calculated shipping or a third-party fulfillment service.”
Weight unit for display is only how the number is shown on your storefront. The reference lists the valid values and nothing else is accepted: g, kg (the default), lb, oz. “kilograms”, “Kg”, “KG” and “grams” are all invalid — this is an enum, not free text.
How to find it in your CSV
The unit column is easy: filter it to anything that is not exactly one of the four lowercase codes. Spelled-out units and capitalised ones are the two things you will find.
The weight column is the one worth real attention, because a wrong value does not error. Filter for cells containing a decimal point, a comma, a letter, or a space. Each tells you something different:
- A small decimal —
0.35or0.12— is a weight in pounds or kilograms that has not been converted. Squarespace exports pounds; Wix and most European platforms export kilograms. Imported as-is, Shopify rounds it to zero grams. - A unit inside the value —
1.5 kg,500g— means the source sheet never had a separate unit column at all. - A decimal comma —
1,85— is a European kilogram weight, and read as English it is 1.85 of whatever unit you assumed. - A blank is a product that will weigh nothing. Legal, and it silently breaks every carrier-calculated rate.
Also check what unit the source store was configured in. BigCommerce documents its weight field as “numbers only; no units” — the unit is a store setting, so 2.9 could be kilograms or pounds and the file cannot tell you which.
How the converter prevents it
You declare the source unit once, in step 2, and every weight is converted to integer grams on the way out. The conversion uses exact factors — 453.59237 g to the pound, 28.349523125 g to the ounce — and rounds to a whole number, so 0.75 lb becomes 340 and 0.12 kg becomes 120. A unit written inside the cell wins over the declared one, so a sheet mixing 1.5 kg and 500g still converts correctly row by row. Each preset on this site declares the unit its platform actually exports, which is why the Squarespace preset says lb and the Wix preset says kg.
Two rules in src/lib/validate.ts then enforce both columns.
weight_unit_enum rejects any display unit outside the four Shopify permits:
Weight unit “grams” is not g, kg, lb or oz. Use one of g, kg, lb, oz — this is the display unit only.
weight_integer rejects any weight value that is not a whole number of grams:
Weight “1.5” is not an integer number of grams. Pick the correct source unit so the value converts to whole grams.
That second rule is the guard against the silent-zero case: if a decimal reaches the output it means the source unit was declared wrong, and the message says so rather than reporting a format problem. The converter also sets Weight unit for display to gautomatically whenever it produces a weight, so the two columns cannot disagree.
What a correct fix looks like
Set the source weight unit to match your old store’s setting, not to match what the numbers look like. Then sanity-check one product against reality: if a t-shirt comes out at 180 g you have it right, and if it comes out at 0 or 180 000 you do not.
For the display unit, pick what your customers expect to read — it changes nothing about shipping, because the stored value is always grams. For blanks, decide whether the product genuinely has no weight (a digital download, where Requires shipping: FALSE is the right answer) or whether the weight is simply missing, in which case fill it in before you rely on a carrier rate.
Before you retry the import
- Fix the file, not the symptom. Shopify reports the first failure it meets, so a second error usually appears once the first is cleared.
- Import into a development store or a draft-status batch first, so a half-correct file cannot put wrong data in front of customers.
- If you are overwriting existing products by handle, export your live products first: a blank cell in the import can erase a value that is currently there.
Column-by-column reference: the Shopify product CSV format. Nexum Gate is not affiliated with Shopify Inc.