python pandas

Hello,

Since I am working with plaxis connect my python scripts which use pandas are not working anymore. 

I followed the steps in this thread, without success. 

https://communities.bentley.com/products/geotech-analysis/w/wiki/51822/how-to-install-additional-python-modules-in-plaxis

  • Versions

My Plaxis version is 22.00.00.1733

I am used the build in python editor: Python 3.8.10

The panda version I downloaded with pip is: 1.4.4

  • The error message I get is:

 File "C:\ProgramData\Bentley\Geotechnical\PLAXIS Python Distribution V2\python\lib\site-packages\defusedxml\ElementTree.py", line 68, in __init__
_XMLParser.__init__(self, html, target, encoding)
TypeError: __init__() takes 1 positional argument but 4 were given

  • Python code:

import pandas as pd

######################################################### Connect python-plaxis #########################################################

pw = "XXXX"

# PLAXIS 3D
localhostport_input = 10000
localhostport_output = 10001
from plxscripting.easy import *
s_i, g_i = new_server('localhost', localhostport_input, password=pw)
s_o, g_o = new_server('localhost', localhostport_output, password=pw)


filename1='220915_RFEM_Auflagerreaktionen-erdbeben.xlsx'

df_knoten=pd.read_excel(filename1, sheet_name=0,header=0) # Knoten / Nodes   # this line has the error

Parents
  • Dear Marijn,

    It seems that pandas use this module, however, there is an incompatibility. I did some research online to find that a specific version was causing problems.

    As the PLAXIS version you are using is not our latest released, can you please check and upgrade the defusedxml to the latest version?
    In my case upgrading to 0.7.1 seems to have solved the problem.

    Note that as we deliver various modules with PLAXIS it is not easy to track each and every bug modules may have and their compatibility with third-party modules.

    Answer Verified By: marijn de volder 

Reply
  • Dear Marijn,

    It seems that pandas use this module, however, there is an incompatibility. I did some research online to find that a specific version was causing problems.

    As the PLAXIS version you are using is not our latest released, can you please check and upgrade the defusedxml to the latest version?
    In my case upgrading to 0.7.1 seems to have solved the problem.

    Note that as we deliver various modules with PLAXIS it is not easy to track each and every bug modules may have and their compatibility with third-party modules.

    Answer Verified By: marijn de volder 

Children