Erreur in the python3 version

/usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (2.1.0) or chardet (5.2.0) doesn’t match a supported version!
warnings.warn("urllib3 ({}) or chardet ({}) doesn’t match a supported "
File “solid.py”, line 2
from fenics import Constant, Function, AutoSubDomain, VectorFunctionSpace, interpolate,
^
SyntaxError: trailing comma not allowed without surrounding parentheses
i have this erreur and i dont know how to resolated ? i unistall and repeat !!! the same probleme ?§

This error will be related to your Python environment and system, not FEniCS itself.

It’s very difficult to give guidance without knowing how you’ve attempted to install FEniCS or even Python itself. I recommend ensuring you’re consistent with installing packages with an appropriate python interpreter and/or package manager.

i dont know how i can do with this probleme because all the simulation give this error

This should either be
from fenics import Constant, Function, AutoSubDomain, VectorFunctionSpace, interpolate
or
from fenics import (Constant, Function, AutoSubDomain, VectorFunctionSpace, interpolate,) as stated by the error message

1 Like

jai un probleme dinstallation donc jai refaire les installations ca marche .
mais il ya un nouveau probleme sur la convertion de dolfin converter quand jai essaye de faire la conversion de .msh a .xml il n e marche pas jai utilise le meshio il ma donne un erreur sur le couplage
Erreur:
(base) aymen@ubuntu-5:~/preCICE/tutorials/test_conference$ dolfin-convert flaaaa

ap.msh flap.xml

Converting from Gmsh format (.msh, .gmsh) to DOLFIN XML format

Traceback (most recent call last):

File “/home/aymen/miniconda3/bin/dolfin-convert”, line 132, in

main(sys.argv[1:])

File “/home/aymen/miniconda3/bin/dolfin-convert”, line 79, in main

meshconvert.convert2xml(ifilename, ofilename, iformat=iformat)

File "/home/aymen/miniconda3/lib/python3.11/site-packages/dolfin_utils/meshcon

vert/meshconvert.py", line 1301, in convert2xml

convert(ifilename, XmlHandler(ofilename), iformat=iformat)

File "/home/aymen/miniconda3/lib/python3.11/site-packages/dolfin_utils/meshcon

vert/meshconvert.py", line 1322, in convert

gnsh2xml(ifilename,'handler)

File "/home/aymen/miniconda3/lib/python3.11/site-packages/dolfin_utils/meshcon

vert/meshconvert.py", line 256, in gnsh2xml

ifile = open(ifilename, “r”)

I

^AAARAAAAANAAAAA

FileNotFoundError: [Errno 2] No such file or directory: 'flaaaaap.msh

As you have not supplied your mesh or the script you are running, I cannot help you further. Additionally, you are using the outdated dolfin-convert script, and do not supply the error you state that you get with meshio, or the code used to produce that error message

je traavail sur 2 cas :slight_smile:
la 1 er cas quand jai lance le couplage :
Erreur:
—[precice] This is preCICE version 2.5.0
—[precice] Revision info: no-info [git failed to run]
—[precice] Build type: Debug
—[precice] Configuring preCICE with configuration “/home/aymen/preCICE/tutorials/naca_test/solid-fenics/…/precice-config.xml”
—[precice] I am participant “Solid”
Traceback (most recent call last):
File “/home/aymen/preCICE/tutorials/naca_test/solid-fenics/solid.py”, line 86, in
precice_dt = precice.initialize(coupling_boundary, read_function_space=V, write_object=V, fixed_boundary=fixed_boundary)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/aymen/miniconda3/lib/python3.11/site-packages/fenicsprecice/fenicsprecice.py”, line 364, in initialize
raise Exception(“Dimension of preCICE setup and FEniCS do not match”)
Exception: Dimension of preCICE setup and FEniCS do not match
—[precice] Implicitly finalizing in destructor
(base) aymen@ubuntu-5:~/preCICE/tutorials/naca_test/solid-fenics$ ./run.sh
—[precice] ERROR: Vector attribute “coordinate” of tag is 2D, which does not match the dimension of the 3D solver-interface.
La 2 EME CAS / LE MESHIO CONVERTER NE MARCHE PAS
Erreur /
Dolfin xml only supports trangles and tetrahedra consider using XDMF INSTEAD

You still haven’t provided a reproducible example. This is only output from your coupling with precise, not any actual code that I could run locally to reproduce your error.

The error seems to be saying you should stop using XML file format and instead use XDMF file format. Can you try that?

Jai pas compris votre réponse tu peut m’expliquera bien merci

Dans le couplage est ce que ci possible de utiliser la format XDMF

First of all, it would be beneficial if you wrote in english, as I don’t speak french, and have to google translate everything you write.

Trying to be more clear:

  1. You have not added a code to the post that can reproduce the error. See for instance: Read before posting: How do I get my question answered? - #4 by nate
    for examples on how to write questions that can be answered.
1 Like

@AymenAmiral1997 Closing this one too, for similar reasons as Probleme in the couplage openFoam FEniCS - #2 by dokken. Please start afresh in a new post that follows the guidelines, and the suggestions you received here and in the other post too.