BUG: Input buffer size wasn't large enough.

Open
#1,237 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
python
Domain
data

Research direction

Start with suite2p/io/tiff.py, especially tiff_to_binary and read_tiff, following the traceback to the ScanImageTiffReader data call. Reproduce the GUI conversion with the reported TIFF inputs and determine why the input buffer is insufficient; done means the conversion completes without this exception.

Written by the indexing model from the issue text.

Description

Describe the issue:

Hi,

I'm currently using the latest version of suite2p. When I try to run from the GUI, I end up with this error message. Could you help me? I really have no idea what's <<Input buffer size wasn't large enough.>> means... I'm trying to process 12 files of 1.5Gb each. I was wondering if it was not due a RAM problem, but even with only 2 files the problem remains...

Thank you!

Antoine

Reproduce the code example:
2026-04-28 15:06:28,166 [INFO] data_path: ['D:/tmp/#5937/14']
2026-04-28 15:06:28,167 [INFO] ** Found 12 files - converting to binary **
ERROR: Input buffer size wasn't large enough.
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda\envs\suite2p\Lib\site-packages\suite2p\gui\rungui_utils.py", line 134, in run
    run_s2p(db=db, settings=settings)
  File "C:\ProgramData\Anaconda\envs\suite2p\Lib\site-packages\suite2p\run_s2p.py", line 435, in run_s2p
    dbs = files_to_binary[db["input_format"]](dbs, settings, files, files_chan2)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\Anaconda\envs\suite2p\Lib\site-packages\suite2p\io\tiff.py", line 202, in tiff_to_binary
    im = read_tiff(file, tif, Ltif, ix, batch_size, use_sktiff)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\Anaconda\envs\suite2p\Lib\site-packages\suite2p\io\tiff.py", line 126, in read_tiff
    im = tif.data(beg=ix, end=ix + nfr)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\Anaconda\envs\suite2p\Lib\site-packages\ScanImageTiffReader\__init__.py", line 309, in data
    raise Exception(self.__ctx.log.decode("utf-8","strict"))
Exception: Input buffer size wasn't large enough.
error
Example input dataset used to reproduce the issue:

No response

Error message:

Version information:

suite2p v1.0.0.1

Context for the issue:

No response

Dominant language
Python
Stars
473
Forks
283
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MouseLand/suite2p

All issues in MouseLand/suite2p

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.