question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'Image' object has no attribute '_VImageAdapter__inputref'

See original GitHub issue
Traceback (most recent call last):
  File "/opt/conda/envs/gis-dataprocessing/bin/gdal2mbtiles", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/envs/gis-dataprocessing/lib/python3.7/site-packages/gdal2mbtiles/main.py", line 309, in main
    colors=colors, band=band)
  File "/opt/conda/envs/gis-dataprocessing/lib/python3.7/site-packages/gdal2mbtiles/helpers.py", line 211, in warp_mbtiles
    pngdata=pngdata)
  File "/opt/conda/envs/gis-dataprocessing/lib/python3.7/site-packages/gdal2mbtiles/helpers.py", line 73, in image_mbtiles
    pyramid = preprocessor(**locals())
  File "/opt/conda/envs/gis-dataprocessing/lib/python3.7/site-packages/gdal2mbtiles/helpers.py", line 324, in resample_after_warp
    pyramid.dataset.resample(resolution=resolution)
  File "/opt/conda/envs/gis-dataprocessing/lib/python3.7/site-packages/gdal2mbtiles/vips.py", line 601, in resample
    ratios=self.GetScalingRatios(resolution=resolution, places=5)
  File "/opt/conda/envs/gis-dataprocessing/lib/python3.7/site-packages/gdal2mbtiles/vips.py", line 582, in _resample
    output_size=(dst_width, dst_height)
  File "/opt/conda/envs/gis-dataprocessing/lib/python3.7/site-packages/gdal2mbtiles/vips.py", line 392, in stretch
    interpolate='near'
  File "/opt/conda/envs/gis-dataprocessing/lib/python3.7/site-packages/gdal2mbtiles/vips.py", line 349, in _scale
    interpolate=interpolate)
  File "/opt/conda/envs/gis-dataprocessing/lib/python3.7/site-packages/gdal2mbtiles/vips.py", line 281, in affine
    image.__inputref = self.image
AttributeError: 'Image' object has no attribute '_VImageAdapter__inputref'

Versions

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
$ vips --version
vips-8.4.5-Wed Jan 18 12:36:44 UTC 2017
$ gdalinfo --version
GDAL 2.4.2, released 2019/06/28
$ pip freeze | grep gdal
gdal2mbtiles==2.1.1
$ pip freeze | grep proj
pyproj==2.2.1
$ pip freeze | grep rasterio
rasterio==1.0.28

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
damon-randcommented, Feb 7, 2020

@dazza-codes We did push a fix/release to pin pyvips. Please let us know if that solves your issue.

1reaction
damon-randcommented, Jan 21, 2020

@dazza-codes Thanks for looking into it at length. We have been looking in to it as well internally but have limited resources. A lot of this library was written by individuals who have since moved on so please bear with us. IIRC the switch to pyvips 2 years ago was for Python 3 compatibly going forward.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'Image' object has no attribute 'thumbnail'
I tried your code and got the error: AttributeError: 'Array' object has no attribute 'thumbnail' . I corrected the code by converting the ......
Read more >
AttributeError: 'Image' object has no attribute 'rotation_corr' #8
I tried running your script : example_scripts/k210/detector/person_detector_v4.py but it raised an error below.
Read more >
AttributeError: 'Image' object has no attribute 'new'
Hi everyone, Recently I tried to train my model on ImageNet and I tried to use inception and Alexnet like preprocessing.
Read more >
AttributeError: 'Image' object has no attribute 'new' : r/pytorch
Hi everyone, Recently I tried to train my model on ImageNet and I tried to use inception and Alexnet like preprocessing.
Read more >
AttributeError: 'Participant' object has no attribute 'task_rounds'
Hi All,. I am using "random_task_order" snippet code in my project (see attached image). I am getting the following error.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found