Troubleshooting#
Please follow the instructions below to troubleshoot common pitfalls in Cegal Prizm or gather the necessary information before contacting Cegal Support (support.geo@cegal.com).
1. Authentication issues#
If you encounter one of the following error messages after executing your Python code it is likely that you do not have correct claims for Cegal Prizm:
[ ]:
from cegalprizm.pythontool import PetrelConnection
petrel = PetrelConnection()
[ ]:
from cegalprizm.pythontool import PetrelConnection
petrel = PetrelConnection()
The basic Investigator functionality can be accessed with any additional licenses. However, using the licensed features without having the correct claims will result in the following error message:
[ ]:
import cegalprizm.investigator as investigator
from cegalprizm.investigator import InvestigatorConnection
from cegalprizm.investigator.views import CrossplotView
invconnection = InvestigatorConnection(use_licensed_features=True)
investigation = invconnection.load_investigation('Investigation')
cs_view = CrossplotView(investigation)
investigator.plot(cs_view, 600, 400)
If you encounter one of the issues from above, please confirm with your Tenant Admin that you have access to PythonTool Pro and/or Investigator. You can find your Tenant Admin by using Show My Admins button in Keystone portal https://keystone.cegal-geo.com/ main page.
After ensuring that you have the correct access rights with your Tenant Admin, delete auth.db file from C:\Users\yourusername\.cegal-keystone
if there is one, restart Petrel, restart your Cegal Hub connection and rerun your Python code. If the problem persists, please contact Cegal Support and send us the necessary logs as described at the bottom of this page to make troubleshooting process easier.
2. Cannot connect to Petrel using PetrelConnection()
or InvestigatorConnection()
methods#
If you encounter issues connecting to your Petrel project using PythonTool Pro or Investigator go to your Petrel project, select Cegal Hub under the Marina drop-down menu and navigate to Cegal Hub Server Connection. Make sure that your Hub server status is running ( Running:True ) and the Petrel Connector status is Connected ( Connected:True ). If the Petrel Connector status is disconnected ( Connected:False ) click the Conenct button.
Another way of checking the connection status is by opening your PowerShell console and executing cegalhub client query-connectors --pp
. If only one Petrel instance is running, you should see similar output as in the screenshot below. If the cegal.hub.petrel connector is not listed, or the PowerShell command fails, go to your Petrel project, open Marina, open Cegal Hub Server Connection tab and use Connect button. Verify that Petrel connector can be listed now using PowerShell and
rerun your Python code.
If the Connect button is disabled and the Hub Server status is Running:False, check with your IT department and make sure that Cegal Hub is allowed to communicate through Windows Defender Firewall.
If the problem persists, please contact Cegal Support and send us the necessary logs as described at the bottom of this page to make troubleshooting process easier.
3. Cannot start Petrel programmatically using new_petrel_instance()
method#
If you struggle to start your Petrel instance in the background using new_petrel_instance()
method, check if the favorite (starred) license profile is selected and that Cegal Hub plugin is installed for the Petrel version you are trying to use. You can also select the Petrel version and license profile explicitly, e.g. new_petrel_instance(petrel_version=2022, license_profile="prizm")
. Cegal Hub by default will allow only two instances of Petrel running in the background. This number can
be changed by modifying “MaxInstances” entry in petrel.json file in C:\Users\<yourusername>\AppData\Local\Cegal\Hub\apps
.
Cegal Prizm installation and configuration recommendations#
Cegal Prizm tips and tricks#
You can check how many Cegal Hub and Petrel instances are running on your machine by executing
Get-Process *cegalhub*
andGet-Process *petrel*
from PowerShell. This can be handy when working with Petrel in the background
Gather the data before contacting Cegal support#
To make the troubleshooting process as smooth as possible we kindly ask you to gather relevant information before contacting Cegal support. When contacting Cegal support:
Attach information about your Python environment (at least the versions of the Prizm components):
activate Python environment from your console and use commands
python --version pip list
Collect Cegal Hub logs:
if using a local Hub connection on Windows, first close all your Hub connections by executing the following command from PowerShell:
Get-Process *cegalhub* | kill
It will kill all Hub instances on your machine
then, start Hub from PowerShell with additional logging enabled by running:
cegalhub local --debug
- you might need to reconnect your Petrel project now. Go to your Petrel project, open Marina, open Cegal Hub Server Connection tab and use Connect button
follow the next step to include logging into your Python code and then send us the local.log file, located in
C:\Users\<yourusername>\AppData\Local\Cegal\Hub\log
Include logging into your Python code:
include the logging code snippet into your script/notebook:
import logging logging.basicConfig(filename="CegalPrizmPythonCodeLog.txt") logging.getLogger().setLevel(logging.WARNING) logging.getLogger("cegalprizm.hub").setLevel(logging.DEBUG) #logging.getLogger("cegalprizm.investigator").setLevel(logging.DEBUG) #uncomment this line if needed #logging.getLogger("cegalprizm.pythontool").setLevel(logging.DEBUG) #uncomment this line if needed
- if your problem is related to PythonTool Pro or Investigator, uncomment according line of logging code snippet
run your Python code and send us the CegalPrizmPythonCodeLog.txt file, located in the same directory as your script/notebook