Forum

Author Topic: Runtime Error when activating Metashape in Jupyter Labs  (Read 1459 times)

_danny_

  • Newbie
  • *
  • Posts: 16
    • View Profile
Runtime Error when activating Metashape in Jupyter Labs
« on: March 11, 2022, 08:37:12 AM »
I've begun receiving a runtime error when trying to activate Metashape in Jupyter Labs.

Code: [Select]
import Metashape
Metashape.License().activate("xxxx-xxxx-xxxx-xxxx")

The error is:

Code: [Select]
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_13284/4131372149.py in <module>
      1 import Metashape
----> 2 Metashape.License().activate("xxxx-xxxx-xxxx-xxxx")

RuntimeError: Unexpected error occurred

The GUI version of Metashape is working fine, but I cannot access the python API at all..

_danny_

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Runtime Error when activating Metashape in Jupyter Labs
« Reply #1 on: March 11, 2022, 08:56:32 AM »
Not too sure what caused the runtime error, but I was able to fix the issue by using the activateOffline and the path of the agisoft.lic file in the installation folder, which was probably the correct way to be doing this anyway..

Code: [Select]
Metashape.License().activateOffline('C:\Program Files\Agisoft\Metashape Pro\metashape.lic')