Forum

Author Topic: Photoscan Module is deprecated WARNING  (Read 4094 times)

Costas

  • Jr. Member
  • **
  • Posts: 70
  • Aerial Mapping
    • View Profile
Photoscan Module is deprecated WARNING
« on: December 01, 2021, 05:46:19 PM »
When i open the program i get the following Warning (in RED) in the console.

Quote
2021-12-01 16:36:25 Agisoft Photogrammetric Kit for TOPCON Version: 1.7.5 build 13229 (64 bit)
2021-12-01 16:36:25 Platform: Windows
2021-12-01 16:36:25 CPU: AMD Ryzen 7 2700X Eight-Core Processor (desktop)
2021-12-01 16:36:25 CPU family: 23 model: 8 signature: 800F82h
2021-12-01 16:36:25 RAM: 63.9 GB
2021-12-01 16:36:25 OpenGL Vendor: NVIDIA Corporation
2021-12-01 16:36:25 OpenGL Renderer: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2
2021-12-01 16:36:25 OpenGL Version: 4.6.0 NVIDIA 496.76
2021-12-01 16:36:25 Maximum Texture Size: 32768
2021-12-01 16:36:25 Quad Buffered Stereo: not enabled
2021-12-01 16:36:25 ARB_vertex_buffer_object: supported
2021-12-01 16:36:25 ARB_texture_non_power_of_two: supported
2021-12-01 16:36:25 To execute this script press Custom menu/Add reference altitude
2021-12-01 16:36:25 To execute this script press Custom menu/Align model or dense point cloud
2021-12-01 16:36:25 To execute this script press Custom menu/Color Model with Altitude
2021-12-01 16:36:25 To execute this script press Custom menu/Color Model with Overlap
2021-12-01 16:36:25 To execute this script press AI tools/Detect objects
2021-12-01 16:36:25 To execute this script press Custom menu/Masking by color
2021-12-01 16:36:25 To execute this script press Custom menu/Read RelativeAltitude from DJI metadata
2021-12-01 16:36:25 Warning: PhotoScan module is deprecated, use Metashape module instead
2021-12-01 16:36:33 imported  auto_gamma_correction
2021-12-01 16:36:33 imported  buffer_by_markers
2021-12-01 16:36:33 imported  chunk_region_setter
2021-12-01 16:36:33 imported  crs_uploader
2021-12-01 16:36:33 imported  expimp_by_marker
2021-12-01 16:36:33 imported  export_by_shapes
2021-12-01 16:36:33 imported  fast_layout
2021-12-01 16:36:33 imported  gnss_post_processing
2021-12-01 16:36:33 imported  image_channel_mixer
2021-12-01 16:36:33 imported  gnss_processing
2021-12-01 16:36:33 imported  make_masks_from_shapes
2021-12-01 16:36:33 imported  mesh_creator
2021-12-01 16:36:33 imported  shape_worker
2021-12-01 16:36:33 imported  plugins_configurator
2021-12-01 16:36:33 imported  quality_estimator
2021-12-01 16:36:33 imported  remove_image_duplicates
2021-12-01 16:36:33 imported  set_altitudes_for_shape
2021-12-01 16:36:33 imported  shape_worker
2021-12-01 16:36:33 imported  tab_meta_creator
2021-12-01 16:36:33 To execute this script press Custom menu/Split in chunks


If i remember correctly (it's months now) it started after installing a collection of scripts from Geoscan (https://github.com/geoscan/geoscan_plugins#readme)
Most scripts from Geoscan (but not all) work fine but a few do not work. All my other scripts from the community work fine.


Why is that and how can i fix it?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15173
    • View Profile
Re: Photoscan Module is deprecated WARNING
« Reply #1 on: December 01, 2021, 06:50:44 PM »
Hello Costas,

To avoid the display of this warning message, you can replace the following line in the scripts, where it is present:
Code: [Select]
import PhotoScanwith the following:
Code: [Select]
import Metashape as PhotoScan
Best regards,
Alexey Pasumansky,
Agisoft LLC

Costas

  • Jr. Member
  • **
  • Posts: 70
  • Aerial Mapping
    • View Profile
Re: Photoscan Module is deprecated WARNING
« Reply #2 on: December 02, 2021, 11:08:19 AM »
Thank you for your answer Alexey.

I checked my scripts and none of them had this line
Code: [Select]
import PhotoScan
They all had "import Metashape"


So i'm sure that the problem is somewhere in the Collection of scripts from Geoscan (https://github.com/geoscan/geoscan_plugins)
The problem is that i cannot check all of them because there are a total of 178 folder with 441 files and almost half of them are .py files.

I did some checking in a few files but none of them contained the word Photoscan. All of them were for Metashape.

Anyway.

My question is if there is a problem with functionality or it's just a Warning message with no other effects.

Is there a problem with my version of Metashape witch is actually "Agisoft Photogrammetric Kit for Topcon" ?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15173
    • View Profile
Re: Photoscan Module is deprecated WARNING
« Reply #3 on: December 02, 2021, 03:01:57 PM »
Hello Costas,

Currently the warning message can be ignored and the script functionality wouldn't be affected, if PhotoScan instead of Metashape module name is used.

But you can check .py files contents in autostart folders, just for case any of them contain "PhotoScan". See the information about autostart folders here:
https://agisoft.freshdesk.com/support/solutions/articles/31000133123-how-to-run-python-script-automatically-on-metashape-professional-start
(you may look for  APK folder instead of Metashape Pro, while using Photogrammetric Kit).
Best regards,
Alexey Pasumansky,
Agisoft LLC

Paulo

  • Hero Member
  • *****
  • Posts: 1362
    • View Profile
Re: Photoscan Module is deprecated WARNING
« Reply #4 on: December 02, 2021, 03:46:10 PM »
Hi Costas,

as Alexey it is not so serious but if you want I found the text
Quote
import PhotoScan
in following files from GeoScan collection:
Code: [Select]
Searching for: import PhotoScan
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\BaseClasses\AbstractListWidget.py(23): import PhotoScan
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\cg\basis_line_ops.py(19): import PhotoScan
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\cg\geometry.py(21): import PhotoScan
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\clustering\marker_clustering.py(23): import PhotoScan as ps
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\shape_worker\shape_worker.py(19): import PhotoScan
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\shape_worker\shape_worker.py(20): import PhotoScan as ps
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\startup\initialization.py(35): print("Couldn't find Metashape module, trying to import PhotoScan module instead")
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\startup\initialization.py(37): import PhotoScan as ps
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\utils\bridge.py(19): import PhotoScan
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\utils\helpers.py(22): import PhotoScan as ps
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\utils\markers.py(19): import PhotoScan as ps
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\utils\network_processing.py(21): import PhotoScan as ps
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\utils\paths.py(20): import PhotoScan
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\utils\pixel_errors.py(20): import PhotoScan
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\utils\project.py(20): import PhotoScan
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\utils\Referencer.py(20): import PhotoScan
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\utils\sensor_tools.py(19): import PhotoScan
C:\Users\paul.pelletier\AppData\Local\Agisoft\Metashape Pro\scripts\common\utils\spatial_errors.py(19): import PhotoScan
Found 18 occurrence(s) in 16 file(s), 1174 ms
so if you edit these 16 files and replace
Quote
import PhotoScan
with
Quote
import Metashape as PhotoScan
you should no longer get message...
« Last Edit: December 02, 2021, 03:48:59 PM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor

Costas

  • Jr. Member
  • **
  • Posts: 70
  • Aerial Mapping
    • View Profile
Re: Photoscan Module is deprecated WARNING
« Reply #5 on: December 07, 2021, 06:36:38 PM »
Thank you a lot for your help Paulo.

I didn't expect someone to look this up. A big THANK you.