Skip to content
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

TypeError: Parallel.__init__() got an unexpected keyword argument 'return_as' #39

Closed
danschef opened this issue Apr 3, 2024 · 2 comments
Assignees
Milestone

Comments

@danschef
Copy link
Collaborator

danschef commented Apr 3, 2024

I have no problem with co-registration using the Global approach. However, the error message below occurs when trying the local registration, even when I use only 1 CPU. Different grid_res same error. Any suggestions?
arosics version: 1.10.2
Python version: 3.11.8
Operating System: Windows 11

>>> COREG_LOCAL(
...     "path_to/RefImage.tif",
...     "path_to/SourceImage.tif",
...     grid_res=50,
...     window_size=(256, 256),
...     r_b4match=1,
...     path_out=None,
...     CPUs=1,
...     q=False
... ).correct_shifts()
Calculating footprint polygon and actual data corner coordinates for reference image...
Bounding box of calculated footprint for reference image:
        (474683.0, 6686905.0, 476442.0, 6691721.0)
Calculating footprint polygon and actual data corner coordinates for image to be shifted...
Polygonize progress     |==================================================| 100.0% Complete  => 0:00:00
Bounding box of calculated footprint for image to be shifted:
        (474682.96922200004, 6686904.749473, 476441.569222, 6691721.099473)
Matching window position (X,Y): 475562.28606702085/6689313.000074867
Initializing tie points grid...
Equalizing pixel grids and projections of reference and target image...
Warping progress     |==================================================| 100.0% Complete  => 0:00:18
Warping progress     |==================================================| 100.0% Complete  => 0:00:01
Calculating tie point grid (16692 points) using 1 CPU cores...
Traceback (most recent call last):
  File "<stdin>", line 10, in <module>
  File "d:\pygis\Lib\site-packages\arosics\CoReg_local.py", line 821, in correct_shifts
    self.calculate_spatial_shifts()
  File "d:\pygis\Lib\site-packages\arosics\CoReg_local.py", line 491, in calculate_spatial_shifts
    self._tiepoint_grid.get_CoRegPoints_table()
  File "d:\pygis\Lib\site-packages\arosics\Tie_Point_Grid.py", line 345, in get_CoRegPoints_table
    Parallel(n_jobs=self.CPUs, **kw_parallel)(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Parallel.__init__() got an unexpected keyword argument 'return_as'

Originally posted by @leikas227 in #36 (comment)

@danschef
Copy link
Collaborator Author

danschef commented Apr 3, 2024

@leikas227
The reason here is that the return_as parameter does not exist in joblib<1.3.0. I will add a minimal version pinning.

@danschef
Copy link
Collaborator Author

danschef commented Apr 3, 2024

See https://git.gfz-potsdam.de/danschef/arosics/-/merge_requests/52. This will be part of v1.10.3. The conda-forge package will be directly updated in conda-forge/arosics-feedstock#78 (new build should be available soon).

@danschef danschef added this to the v1.10.3 milestone Apr 3, 2024
@danschef danschef self-assigned this Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant