Forum

Author Topic: requests Module fails to import in Metashape 1.5  (Read 325 times)

Paulo

  • Full Member
  • ***
  • Posts: 246
    • View Profile
requests Module fails to import in Metashape 1.5
« on: February 02, 2019, 01:38:16 AM »
Hi all,

I am trying to run a python script that ran correctly on PS1.4...

the script contains following code:

import requests

and get following error in Metashape

2019-02-01 07:21:23   File "C:/Users/paul.pelletier/Documents/Pi3d/AutoProcess_v1/AutoProcess_v15_adapFit_Newmesh.py", line 14, in <module>
2019-02-01 07:21:23     import requests
2019-02-01 07:21:23 ImportError: No module named 'requests'
2019-02-01 07:21:23 Error: No module named 'requests'

How can I get request module to work in Metashape?

I found solution to this problem consulting the Agisoft solutions page https://agisoft.freshdesk.com/support/solutions

and using following system command:

"%programfiles%\Agisoft\Metashape Pro\python\python.exe" -m pip install requests
« Last Edit: February 02, 2019, 08:07:55 PM by Paulo »
Best Regards,

Paul Pelletier

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 10294
    • View Profile
Re: requests Module fails to import in Metashape 1.5
« Reply #1 on: February 02, 2019, 08:19:36 PM »
Hello Paul,

What happens when you tried to install "requests" module? Does it solve the problem?
Best regards,
Alexey Pasumansky,
AgiSoft LLC

Paulo

  • Full Member
  • ***
  • Posts: 246
    • View Profile
Re: requests Module fails to import in Metashape 1.5
« Reply #2 on: February 02, 2019, 08:27:39 PM »
Hi Alexey,

yes after installing requests in command mode, I can run the script with no problem!

Thanks,
Best Regards,

Paul Pelletier