Fixing Shopify & Matrixify CSV Import Errors: Silent Image Drops, SKU Collisions, and UTF-8 BOM Bugs
Most Shopify catalog incidents do not fail with a loud red banner. They finish with a green email saying
Imported 1,842 products with 0 errors—and two hours later someone notices that 310 products have no photos,
European wholesale items went live at $0.00, or Matrixify MERGE overwrote active inventory counts
because Excel converted two different 13-digit barcodes into 7.89E+12.
These field notes document the exact byte-level failure modes we catch before any supplier file touches Shopify staging, along with repeatable Python commands you can run locally before clicking Import.
1. Silent Image Drops (Image Src vs Variant Image)
Shopify's background image fetcher pulls remote URLs asynchronously after the CSV rows are parsed. Because the fetch runs outside the initial row validator, broken media URLs frequently leave products published with blank gallery cards.
Line 412: Image failed to download: HTTP 403 ForbiddenValidation failed: Variant image must be one of the product imagesLine 905: Image failed to download: Content-Type text/html is not a supported image
Four root causes that drop images silently
- HTML landing links disguised as image URLs: Wholesalers paste Google Drive
/file/d/.../viewor Dropbox?dl=0URLs intoImage Src. Those endpoints returnHTTP 200withContent-Type: text/html, so a naive status-code ping passes while Shopify rejects the payload. Variant Imagestring mismatch: IfImage Srcuseshttps://cdn.vendor.com/sku-1.jpg?v=2andVariant Imageomits?v=2(or useshttp://), Shopify treats them as different assets or fails variant attachment.Image Positioncollisions per Handle: RepeatingImage Position = 1on multiple rows for the sameHandlewithout unique URLs or leaving gaps with blankImage Srccauses gallery reordering or skipped secondary angles.- Hotlink / User-Agent blocks and unencoded spaces: Spaces (
red shirt.jpginstead ofred%20shirt.jpg) and supplier CDNs that block Shopify's Ruby/Faraday fetcher with403fail silently in bulk imports.
Copy-pasteable Python image preflight check
Run this against your prepared CSV before uploading. It checks Content-Type, URL encoding, and cross-checks every Variant Image against the parent handle's Image Src set:
python -B -c "
import csv, urllib.request, urllib.parse
from collections import defaultdict
path = 'supplier_ready.csv'
handle_imgs = defaultdict(set)
variant_refs = []
with open(path, 'r', encoding='utf-8-sig', newline='') as f:
for idx, row in enumerate(csv.DictReader(f), start=2):
h = (row.get('Handle') or '').strip()
src = (row.get('Image Src') or '').strip()
vimg = (row.get('Variant Image') or '').strip()
if src:
handle_imgs[h].add(src)
if ' ' in src:
print(f'LINE {idx}: unencoded space in Image Src -> {src}')
if vimg:
variant_refs.append((idx, h, vimg))
for idx, h, vimg in variant_refs:
if vimg not in handle_imgs[h]:
print(f'LINE {idx}: Variant Image not in Handle Image Src set ({h}) -> {vimg}')
checked = set()
for h, urls in handle_imgs.items():
for u in urls:
if u in checked:
continue
checked.add(u)
try:
req = urllib.request.Request(u, method='HEAD', headers={'User-Agent': 'Shopify-Preflight/1.0'})
with urllib.request.urlopen(req, timeout=8) as r:
ctype = r.headers.get('Content-Type', '')
if not ctype.lower().startswith('image/'):
print(f'BAD CONTENT-TYPE ({ctype}): {u}')
except Exception as e:
print(f'FETCH FAIL ({e}): {u}')
"
2. SKU Collisions, Excel Scientific Notation & Variant Axis Overflows
Opening a wholesaler CSV in Microsoft Excel and hitting Ctrl+S is the fastest way to corrupt catalog identity keys. Excel silently coerces any numeric string longer than 11 digits into floating-point scientific notation and truncates trailing precision beyond 15 digits.
Raw supplier CSV:
Handle,Option1 Name,Option1 Value,Variant SKU,Variant Barcode,Variant Price
bolt-m8-ss,Length,20mm,004812,7891234567891,14.50
bolt-m8-ss,Length,25mm,004813,7891234567892,15.00
After opening and saving once in Excel:
Handle,Option1 Name,Option1 Value,Variant SKU,Variant Barcode,Variant Price
bolt-m8-ss,Length,20mm,4812,7.89123E+12,14.5
bolt-m8-ss,Length,25mm,4813,7.89123E+12,15
Both rows now share the exact same corrupted barcode 7.89123E+12, and the leading zeros on 004812 are gone.
If your store runs Matrixify MERGE matched by Variant SKU, 4812 creates a brand-new duplicate variant
instead of updating 004812—or worse, overwrites an unrelated product whose SKU happened to be 4812.
Other hard Shopify & Matrixify structural errors
The variant 'Default Title' already exists: Occurs when a multi-variant product has one row with a blankOption1 Valueor when duplicate option tuples (Color=Black, Size=L) appear twice under the sameHandle.Only 3 product options are allowed: Industrial and hardware suppliers routinely ship 4–5 columns (Material × Thread × Length × Finish). Native Shopify allows at mostOption1–Option3; extra axes must be folded deterministically intoHandlesplits or metafields rather than dropped.- 2D Size × Color wholesale cross-tabs: Suppliers send grids where sizes run horizontally across columns
G:Nand SKUs sit inside intersecting cells. Standard Shopify CSV expects one variant per row; unpivoting those grids manually in Excel is where row-shift pricing mistakes happen.
3. UTF-8 BOM (EF BB BF), Windows-1252 Smart Quotes & Semicolon Delimiters
Three byte-level encoding bugs account for most "my headers are clearly there, why does Shopify say Handle is missing?" tickets:
| Byte Signature / Pattern | Observed Error Message | Root Cause | Deterministic Fix |
|---|---|---|---|
EF BB BF 48 61 6E 64 6C 65 |
Invalid CSV Header: Missing headers Handle, Title |
UTF-8 BOM prepended by Excel "CSV UTF-8" export turns col 1 into \ufeffHandle in strict parsers. |
Read with utf-8-sig, write out clean utf-8 (no BOM) and LF/CRLF normalized line endings. |
0x92, 0x93, 0x94, 0x96, 0xA3 |
Invalid byte sequence in UTF-8 |
File is actually Windows-1252 (cp1252) with curly quotes, en-dashes, or raw £/€ symbols. |
Decode explicitly as cp1252 (never blind errors='ignore'), normalize punctuation, re-encode as UTF-8. |
sku-1;29,99;14,50 |
Prices imported as $2999.00 or $0.00 |
European regional Excel exports ; delimiters and comma decimal separators. |
Detect delimiter on header row, parse locale decimals cleanly, and enforce a >30% price-drop gate against baseline. |
Inspect the first 32 bytes and convert safely to clean UTF-8
python -B -c "
raw = open('vendor_export.csv', 'rb').read()
print('FIRST 24 BYTES HEX:', raw[:24].hex(' '))
print('HAS UTF-8 BOM:', raw.startswith(b'\xef\xbb\xbf'))
try:
text = raw.decode('utf-8-sig')
print('DECODED AS: utf-8 / utf-8-sig')
except UnicodeDecodeError as e:
print('UTF-8 FAILED AT BYTE', e.start, '-> falling back to cp1252')
text = raw.decode('cp1252')
with open('vendor_export_clean_utf8.csv', 'w', encoding='utf-8', newline='\n') as out:
out.write(text)
print('WROTE CLEAN UTF-8 (NO BOM): vendor_export_clean_utf8.csv')
"
4. Shopify Native CSV vs Matrixify vs Pre-Import 6-Gate Preflight
| Failure Risk | Shopify Native CSV | Matrixify (XLSX / CSV) | Local 6-Gate Preflight |
|---|---|---|---|
Decimal drop (29,99 → $0 or $2999) |
Imports live with zero warning | Imports live unless manually audited | Hard-blocks $0, negative prices, and >30% drops vs baseline |
Duplicate Variant SKU across Handles |
Allowed; breaks 3PL/ERP sync | Can overwrite wrong product in MERGE |
Flags exact colliding rows & line numbers pre-upload |
Broken / HTML-redirect Image Src |
Silent blank gallery after import | Reports only after import run completes | Verifies URL syntax, Variant Image set match & image MIME |
| Merged Excel cells & 2D size matrices | Not supported (CSV only) | Requires flat variant rows first | Deterministic Python unmerge & unpivot with zero LLM guessing |
5. Recommended Pre-Import Staging Checklist
- Never save raw CSVs through Excel: Keep the supplier's original
.xlsxor.csvimmutable and run deterministic scripts against a copy. - Export a baseline snapshot first: Pull your current live Shopify product export so your preflight script can diff every price change (blocking accidental
>30%markdowns or blanked compare-at prices). - Run a 10-SKU staging canary: Import the first 10 representative multi-variant rows into a staging store (or Matrixify Dry Run) before pushing all 2,500–15,000 SKUs.
- Verify image attachment on the storefront, not just Admin: Confirm every swatch/variant switches to the right photo and zero rows fell back to placeholder icons.
Run a Zero-Upload Check Right Now—or Hand Off the Whole File
Need to inspect a suspicious supplier CSV before importing? Run the browser-local preflight checker with zero signup, grab the open-source MIT CLI/web tool, or use the full deterministic cleaner kit.