Error:'bins` must be positive, when an integer in patch ctf estimation

Hi, I have two problems in patch ctf estimation, Here is the log. How can I correct them ? Thank you !
[CPU: 285.4 MB Avail: 504.12 GB]Child process with PID 236921 terminated unexpectedly with exit code 1.
[CPU: 288.9 MB Avail: 504.12 GB]Traceback (most recent call last):
File “cryosparc_master/cryosparc_compute/run.py”, line 115, in cryosparc_master.cryosparc_compute.run.main
File “cryosparc_master/cryosparc_compute/jobs/ctf_estimation/run.py”, line 438, in cryosparc_master.cryosparc_compute.jobs.ctf_estimation.run.run
File “cryosparc_master/cryosparc_compute/jobs/ctf_estimation/run.py”, line 235, in cryosparc_master.cryosparc_compute.jobs.ctf_estimation.run.run.make_outputs
File “/home/ce01/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/site-packages/matplotlib/pyplot.py”, line 3236, in hist
return gca().hist(
File “/home/ce01/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/site-packages/matplotlib/init.py”, line 1465, in inner
return func(ax, *map(sanitize_sequence, args), **kwargs)
File “/home/ce01/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/site-packages/matplotlib/axes/_axes.py”, line 6862, in hist
m, bins = np.histogram(x[i], bins, weights=w[i], **hist_kwargs)
File “<array_function internals>”, line 180, in histogram
File “/home/ce01/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/site-packages/numpy/lib/histograms.py”, line 793, in histogram
bin_edges, uniform_bins = _get_bin_edges(a, bins, range, weights)
File “/home/ce01/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/site-packages/numpy/lib/histograms.py”, line 424, in _get_bin_edges
raise ValueError(‘bins must be positive, when an integer’)
ValueError: bins must be positive, when an integer

1 Like

@yangtaili Please can you post the following details

  1. camera model
  2. dimensions (in pixels) and frame count of movie files
  3. pixel size (Å)
  4. Did the error happen on one of the n first exposures being processed (where n refers to the number of GPUs used in the job) or part-way through the job?

hi, I have encountered the same problem as you. Whether I try to change the microscope photo or reinstall cryosparc, I always get the same error after “Calling CUDA init from…” log . How did you solve this problem?

Welcome to the forum @Wanl.

Please can you post

  1. the end of the relevant log, beginning with that Calling CUDA init line.
  2. the output of this command on the CryoSPARC master:
    cryosparcm cli "get_job('P99', 'J199', 'job_type', 'version', 'instance_information', 'status',  'params_spec', 'errors_run', 'started_at')"
    
    where you replace P99, J199 with the failed job’s project and job ID’s, respectively.
  3. the outputs of these commands on the CryoSPARC worker where the command failed
    uname -a
    uptime
    nvidia-smi
    # replace with actual path on your CryoSPARC installation
    /path/to/cryosparc_worker/bin/crosparcw gpulist
    
  4. other details

i have encountered the same problem and would like to ask how to solve it
The data was collected with the help of the partner, and I also need to inquire about the camera model.
After motion the pixel size is 0.8192,and the error was hapeen on the beginning of the job.
The following is the information of the error text:

Child process with PID 4248 terminated unexpectedly with exit code 1
Traceback (most recent call last):
  File "cryosparc_master/cryosparc_compute/run.py", line 129, in cryosparc_master.cryosparc_compute.run.main
  File "cryosparc_master/cryosparc_compute/jobs/ctf_estimation/run.py", line 438, in cryosparc_master.cryosparc_compute.jobs.ctf_estimation.run.run
  File "cryosparc_master/cryosparc_compute/jobs/ctf_estimation/run.py", line 235, in cryosparc_master.cryosparc_compute.jobs.ctf_estimation.run.run.make_outputs
  File "/home/lthpc/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/site-packages/matplotlib/pyplot.py", line 3236, in hist
    return gca().hist(
  File "/home/lthpc/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/site-packages/matplotlib/__init__.py", line 1465, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
  File "/home/lthpc/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/site-packages/matplotlib/axes/_axes.py", line 6862, in hist
    m, bins = np.histogram(x[i], bins, weights=w[i], **hist_kwargs)
  File "<__array_function__ internals>", line 180, in histogram
  File "/home/lthpc/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/site-packages/numpy/lib/histograms.py", line 793, in histogram
    bin_edges, uniform_bins = _get_bin_edges(a, bins, range, weights)
  File "/home/lthpc/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/site-packages/numpy/lib/histograms.py", line 424, in _get_bin_edges
    raise ValueError('`bins` must be positive, when an integer')
ValueError: `bins` must be positive, when an integer

Please post that information when you have it.

The camera model is K3,and the dimensions is 5760*4092 Z:32

Thanks @pyz. Please can you also post the output of the following command, where you would replace P99, J199 with the failed Patch CTF job’s actual project and job IDs, respectively:

cryosparcm joblog P99 J199 | tail -n 40

Thanks for your attention. We have reinstalled CryoSPARC, and so far, we haven’t encountered the same issues as before. Thank you