Error Numpy


informacion@...
 

Hello:
I have an ubuntu 20.04.6 LTS installation mounted on virtual machine (virtualbox).
Whith python 3.8.10 and numpy 1.23.5 .
I have installed several virtual machines with different versions of ubuntu and if always gives me the same error
It has worked well for two days and it has given me this error.

2023/03/20 06:56:31-INFO-ApplyRecalibrate-line:150 - Initally match stars with 0.5 px: 0/61
2023/03/20 06:56:32-INFO-ApplyRecalibrate-line:255 - Fitted star is farther from catalog star than necessary: 0.38 > 0.33 px
2023/03/20 06:56:32-INFO-ApplyRecalibrate-line:353 - Not using the refined platepar...
2023/03/20 06:56:32-INFO-ApplyRecalibrate-line:433 - Running FFT alignment...
2023/03/20 06:56:32-INFO-ApplyRecalibrate-line:438 - (2023, 3, 19, 22, 30, 51, 17.0)
2023/03/20 06:56:32-INFO-FFTalign-line:280 - Final catalog limiting magnitude: 4.200
/home/rms/vRMS/lib/python3.8/site-packages/imreg_dft/utils.py:705: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
  mask = np.zeros_like(img, dtype=np.bool)
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/rms/source/RMS/RMS/StartCapture.py", line 1024, in <module>
    night_archive_dir = runCapture(config, duration=duration, nodetect=cml_args.nodetect, \
  File "/home/rms/source/RMS/RMS/StartCapture.py", line 501, in runCapture
    night_archive_dir, archive_name, _ = processNight(night_data_dir, config, \
  File "/home/rms/source/RMS/RMS/Reprocess.py", line 224, in processNight
    recalibrated_platepars = recalibrateIndividualFFsAndApplyAstrometry(night_data_dir, \
  File "/home/rms/source/RMS/RMS/Astrometry/ApplyRecalibrate.py", line 677, in recalibrateIndividualFFsAndApplyAstrometry
    recalibrated_platepars = recalibratePlateparsForFF(
  File "/home/rms/source/RMS/RMS/Astrometry/ApplyRecalibrate.py", line 439, in recalibratePlateparsForFF
    test_platepar = alignPlatepar(
  File "/home/rms/source/RMS/RMS/Astrometry/FFTalign.py", line 284, in alignPlatepar
    res = findStarsTransform(config, calstars_coords, catalog_xy, show_plot=show_plot)
  File "/home/rms/source/RMS/RMS/Astrometry/FFTalign.py", line 150, in findStarsTransform
    res = imreg_dft.imreg.similarity(img_ref, img_mov)
  File "/home/rms/vRMS/lib/python3.8/site-packages/imreg_dft/imreg.py", line 376, in similarity
    bgval = utils.get_borderval(im1, 5)
  File "/home/rms/vRMS/lib/python3.8/site-packages/imreg_dft/utils.py", line 705, in get_borderval
    mask = np.zeros_like(img, dtype=np.bool)
  File "/home/rms/vRMS/lib/python3.8/site-packages/numpy/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations


thank


Mark McIntyre
 

I have the same versions running here, and it isn't generating any error.
I'm running in a Hyper-V container but its essentially the same as virtualbox.

First, make sure you have updated RMS - Unless you're rebooting your VM every night its likely RMS is out of date. Run Scripts/RMS_Update.sh to make sure its updated.

If that doesn't help then I strongly suspect something has accdidentally upgraded numpy. Try the following

cd ~/source/RMS
pip uninstall numpy
pip install -r requirements.txt

This should make sure you've got the correct version.

On 20/03/2023 14:33, informacion@... wrote:

Hello:
I have an ubuntu 20.04.6 LTS installation mounted on virtual machine (virtualbox).
Whith python 3.8.10 and numpy 1.23.5 .
I have installed several virtual machines with different versions of ubuntu and if always gives me the same error
It has worked well for two days and it has given me this error.

2023/03/20 06:56:31-INFO-ApplyRecalibrate-line:150 - Initally match stars with 0.5 px: 0/61
2023/03/20 06:56:32-INFO-ApplyRecalibrate-line:255 - Fitted star is farther from catalog star than necessary: 0.38 > 0.33 px
2023/03/20 06:56:32-INFO-ApplyRecalibrate-line:353 - Not using the refined platepar...
2023/03/20 06:56:32-INFO-ApplyRecalibrate-line:433 - Running FFT alignment...
2023/03/20 06:56:32-INFO-ApplyRecalibrate-line:438 - (2023, 3, 19, 22, 30, 51, 17.0)
2023/03/20 06:56:32-INFO-FFTalign-line:280 - Final catalog limiting magnitude: 4.200
/home/rms/vRMS/lib/python3.8/site-packages/imreg_dft/utils.py:705: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
  mask = np.zeros_like(img, dtype=np.bool)
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/rms/source/RMS/RMS/StartCapture.py", line 1024, in <module>
    night_archive_dir = runCapture(config, duration=duration, nodetect=cml_args.nodetect, \
  File "/home/rms/source/RMS/RMS/StartCapture.py", line 501, in runCapture
    night_archive_dir, archive_name, _ = processNight(night_data_dir, config, \
  File "/home/rms/source/RMS/RMS/Reprocess.py", line 224, in processNight
    recalibrated_platepars = recalibrateIndividualFFsAndApplyAstrometry(night_data_dir, \
  File "/home/rms/source/RMS/RMS/Astrometry/ApplyRecalibrate.py", line 677, in recalibrateIndividualFFsAndApplyAstrometry
    recalibrated_platepars = recalibratePlateparsForFF(
  File "/home/rms/source/RMS/RMS/Astrometry/ApplyRecalibrate.py", line 439, in recalibratePlateparsForFF
    test_platepar = alignPlatepar(
  File "/home/rms/source/RMS/RMS/Astrometry/FFTalign.py", line 284, in alignPlatepar
    res = findStarsTransform(config, calstars_coords, catalog_xy, show_plot=show_plot)
  File "/home/rms/source/RMS/RMS/Astrometry/FFTalign.py", line 150, in findStarsTransform
    res = imreg_dft.imreg.similarity(img_ref, img_mov)
  File "/home/rms/vRMS/lib/python3.8/site-packages/imreg_dft/imreg.py", line 376, in similarity
    bgval = utils.get_borderval(im1, 5)
  File "/home/rms/vRMS/lib/python3.8/site-packages/imreg_dft/utils.py", line 705, in get_borderval
    mask = np.zeros_like(img, dtype=np.bool)
  File "/home/rms/vRMS/lib/python3.8/site-packages/numpy/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations


thank