StockAI will not accept my file

What each notice means when you upload sales or inventory, why it appears, and what to change in the file so it goes in.

On this page
  1. Unsupported format
  2. The file is too large
  3. The file is empty
  4. It cannot be read
  5. The file contains a NUL byte
  6. "1.250": one thousand two hundred fifty, or one point two five?
  7. Rows left out of the inventory
  8. There is something you have to decide first
  9. Products missing after training

Almost every rejection is fixed in the file itself. Find the message you see below; each one says what it means and what to do.

Unsupported format

What you see: "We cannot read .pdf files. Upload one of these formats: …" (with your file's extension).

Why: sales are accepted as CSV, Excel (.xlsx, .xls), Parquet and JSON. A PDF, an image or a compressed file cannot be read as a table.

What to do: export the report from your system as CSV or Excel. If you do not know where to start, download the template: its columns are sku, fecha (date), demanda (demand), tienda, inventario, costo and precio, and only the first three are required.

The file is too large

What you see: "The file is … MB and the limit is … MB. Upload a smaller one or split it up."

Why: each account has a maximum size per file. See Usage limits.

What to do: drop columns StockAI does not use (long descriptions, addresses, notes), save it as CSV instead of Excel, which is lighter, or upload it in parts. If your history genuinely does not fit, write to us from the notice.

The file is empty

What you see: "The file for "…" is empty or has no columns. Upload a CSV with a header row and data." In the inventory importer: "We could not use a single row of the file. Check that it has a product-code column."

Why: the file has no header row, no data rows, or no row carries the product code.

What to do: open it and check that the first row holds the column names and that there is data below. If your system exports a title or a logo above the table, delete it.

It cannot be read

What you see: "We could not read the file you uploaded. Check that it is a valid CSV or Excel file and try again." In inventory: "We could not open the file as a spreadsheet. Export it again as .xlsx or .csv."

Why: the file is damaged, was cut off while downloading, or has an extension that does not match its content (for example, an HTML file renamed to .xls, which is how some systems "export to Excel").

What to do: export it again from your system, open it in your spreadsheet to confirm it looks right, and save it again as .xlsx or .csv.

The file contains a NUL byte

What you see: a notice that the file could not be read, with the technical detail: "The file contains a NUL byte (first seen on line N). Rows containing one cannot be imported, because the value would be silently truncated. Re-export the file from your system."

Why: a NUL byte is an invisible character (code zero) that should not be in a text file. It usually appears when a system exports in an unusual encoding, when the file was left half-written, or when it was copied from a database that stores fixed-length fields. If StockAI let it through, that cell's value would be cut short without warning, so it refuses instead. The line number tells you where the first one is.

What to do: export the file again from your system, preferably as UTF-8 CSV. If the problem persists, open it in your spreadsheet and "Save as" CSV: that drops invisible characters. The inventory importer does not reject the whole file: rows with a NUL byte are skipped and counted among those left out.

"1.250": one thousand two hundred fifty, or one point two five?

What you see: in the inventory importer, the question "Your file writes numbers like 1.250. How much is that?"; when uploading sales, the finding "We cannot tell whether the comma separates thousands or decimals".

Why: in Latin America "1.250" usually means one thousand two hundred fifty; in a system set up in English, one point two five. If nothing in the file settles it, StockAI does not guess: a stock of 1250 read as 1.25 turns a full warehouse red.

What to do: pick the option that matches your system. If you are unsure, look in the file for a number you know, such as the stock of a product you counted yesterday. If your integration uploads inventory through the API, the answer is a 422 with code inventory_import_number_format_unclear: "Your file writes numbers like …, and nothing in it says whether that is … or …. Upload it from Set up my inventory to choose, or fix it in your system." The integration can answer the question by stating the format in the call (see the reference).

Rows left out of the inventory

What you see: in the importer's summary, "Rows with problems left out: …" and "Rows with no product code, skipped: …", with examples such as "Row 214 (SKU-001): "N/A"".

Why: a row with no product code cannot be assigned to anything. A row with text where a number belongs ("N/A", "sold out"), with negative stock or cost, or with a NUL byte, is left out rather than filled with an invented value. If a product appears more than once, the last row wins.

What to do: fix the rows the summary names and import again. If you already corrected some products by hand in StockAI, tick "Do not overwrite what I corrected by hand" so the file only fills what is missing.

There is something you have to decide first

What you see: when confirming your sales columns, the block "There is something you have to decide first", with the continue button switched off. If you try to train anyway: "Before training you have to decide what to do about the problems we found in the file…".

Why: the data check found something that would change the forecast without telling you, such as dates that could be day/month or month/day, or a comma that could separate thousands or decimals.

What to do: answer each question. Every option says what it does and what it costs you if you get it wrong; the one marked recommended is only a suggestion. Once none is left unanswered, the button switches on by itself.

If the message is "This file cannot produce a forecast, and no correction would change that. Check the file and upload it again.", no question will fix it: it is usually a wrong column mapping (for example, the quantity column points at text). Fix the mapping or upload a different file.

Products missing after training

What you see: under Inventory, a notice that some uploaded products were left out of the forecast, with the reason "Only … rows of history (at least 20 are needed)".

Why: a product needs at least 20 periods of history to enter the forecast. With fewer, there is no way to measure whether a model gets it right, so it is left out rather than given an unsupported forecast.

What to do: if the product is new, wait for more history. If you have older history in another file, upload it together. If you sell little each day, try a weekly or monthly detail level: see Granularity. These products do not affect the rest of your recommendations.