-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
relion 5 pick tomograms: RuntimeError: no validator found for <class 'numpy.ndarray'>, see arbitrary_types_allowed
in Config
#1194
Comments
Having exactly the same error. I feel this might be a bug in morphosamplers. It seems natively Pydantic does not support ndarray. Solved or bypassed this issue by adding
in |
@RichStone99 @labzw apologies for this - could you please run |
@alisterburt I have an identical error to @RichStone99 @labzw : Output of pip show morphosamplers: Output of pip show pydantic: Ah, then pydantic 1.x is the culprit? Thanks for your help Alister! |
Hmm, it looks like I have a napari version constraint with napari 0.4.18 [spuser@spgpu TS_01_project]$ pip install --upgrade pydantic In relion5: |
Hello, downgrading to the following versions in the conda environment should fix the issue:
|
Thanks Bogdan, I can confirm that rolling back morphosamplers to version 0.0.13, combined with pydantic 1.10.18 and napari 0.4.18, allowed both the Exclude tilt and Pick tomograms job types to run and complete successfully. |
Update: Remove and recreate conda environment with latest environment.yml works! So after I rebuild the latest version and roll back morphosamplers to 0.0.13, I am getting this error now.......
|
Installed current relion 5 on centOS 9. Am trying the subtomogram averaging tutorial with the HIV VLP data set. Worked well up to "Reconstruct tomograms". Tomograms have been generated and look fine. But when trying to launch "Pick tomograms", napari didn't open and got the following error message. How can we fix it? Seems to relate to pydantic and/or tomography_python_programs.
Btw, napari ran well during, for example, the "Exclude tilt-images" step and inspection of generated tomo in the "Reconstruct tomograms" step. IMOD was used in "Reconstruct tomograms".
Traceback (most recent call last):
File "", line 1, in
File "/home/tangl/sw/miniforge3/envs/relion-5.0/lib/python3.10/site-packages/tomography_python_programs/pick/init.py", line 1, in
from .particles import pick_particles
File "/home/tangl/sw/miniforge3/envs/relion-5.0/lib/python3.10/site-packages/tomography_python_programs/pick/particles.py", line 7, in
from napari_threedee.annotators import PointAnnotator
File "/home/tangl/sw/miniforge3/envs/relion-5.0/lib/python3.10/site-packages/napari_threedee/init.py", line 1, in
from . import data_models
File "/home/tangl/sw/miniforge3/envs/relion-5.0/lib/python3.10/site-packages/napari_threedee/data_models/init.py", line 1, in
from .points import N3dPoints
File "/home/tangl/sw/miniforge3/envs/relion-5.0/lib/python3.10/site-packages/napari_threedee/data_models/points.py", line 8, in
from napari_threedee.annotators.base import N3dDataModel
File "/home/tangl/sw/miniforge3/envs/relion-5.0/lib/python3.10/site-packages/napari_threedee/annotators/init.py", line 5, in
from .surfaces import SurfaceAnnotator
File "/home/tangl/sw/miniforge3/envs/relion-5.0/lib/python3.10/site-packages/napari_threedee/annotators/surfaces/init.py", line 1, in
from .annotator import SurfaceAnnotator
File "/home/tangl/sw/miniforge3/envs/relion-5.0/lib/python3.10/site-packages/napari_threedee/annotators/surfaces/annotator.py", line 12, in
from morphosamplers.surface_spline import GriddedSplineSurface
File "/home/tangl/sw/miniforge3/envs/relion-5.0/lib/python3.10/site-packages/morphosamplers/init.py", line 12, in
from morphosamplers.models import Path, Sphere, Surface, Dipole
File "/home/tangl/sw/miniforge3/envs/relion-5.0/lib/python3.10/site-packages/morphosamplers/models/init.py", line 1, in
from .path import Path
File "/home/tangl/sw/miniforge3/envs/relion-5.0/lib/python3.10/site-packages/morphosamplers/models/path.py", line 7, in
class Path(MorphoModel):
File "pydantic/main.py", line 197, in pydantic.main.ModelMetaclass.new
File "pydantic/fields.py", line 504, in pydantic.fields.ModelField.infer
File "pydantic/fields.py", line 434, in pydantic.fields.ModelField.init
File "pydantic/fields.py", line 555, in pydantic.fields.ModelField.prepare
File "pydantic/fields.py", line 829, in pydantic.fields.ModelField.populate_validators
File "pydantic/validators.py", line 765, in find_validators
RuntimeError: no validator found for <class 'numpy.ndarray'>, see
arbitrary_types_allowed
in ConfigThe text was updated successfully, but these errors were encountered: