[SOLVED] Salome Meca 2017 is not finding Python 2.7 modules.

  • Helio C
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
2 years 9 months ago #9292 by Helio C
Dear colleagues,

While trying to solve a simple problem of a pipe subjected to a tip load (edges only), the installation of Salome Meca coming aboard of CAELinux 2017 have not found the 'encodings' package.
I fixed the problem creating symbolic links, in the 'tools/Code_aster...' to the 'encodings' directory in the 'prerequisites' directory.
So far, so good, then happened a syntax error in the __init__.py code, which I fixed this way:
123c123
< raise CodecRegistryError( \
---
> raise CodecRegistryError,\
125c125
< (mod.__name__, mod.__file__), "")
---
> (mod.__name__, mod.__file__)
132c132
< raise CodecRegistryError( \
---
> raise CodecRegistryError,\
134c134
< (mod.__name__, mod.__file__), "")
---
> (mod.__name__, mod.__file__)

I don't know how something like this may be working in other installations and not in my one.

After this, trying again lead me to the following message, taken from the log file:
>>> 2018/09/04-22:10:30.452 [local_shell@/opt/SalomeMeca/V2017.0.2/tools/Code_aster_frontend-20170/lib/python2.7/site-packages/asrun/system.py:333]
ERROR : iret = 34304
+++ STANDARD OUTPUT:
Fatal Python error: Py_Initialize: Unable to get the locale encoding
Traceback (most recent call last):
File "/opt/SalomeMeca/V2017.0.2/tools/Code_aster_frontend-20170/lib/python2.7/site-packages/encodings/__init__.py", line 31, in <module>
ImportError: No module named 'codecs'
+++ STANDARD ERROR:
+++ END
[FAILED]

What can be going wrong with my installation of SM 2017? It seems like the things fell in the wrong places.

Have anyone faced something similar?

I thank you very much for any advice.

Hélio.

Please Log in or Create an account to join the conversation.

2 years 9 months ago #9295 by Joël Cugnoni
Replied by Joël Cugnoni on topic Salome Meca 2017 is not finding Python 2.7 modules.
Hello

It is strange that you get this error with encoding in the first place. Now it complains that it does not find the library 'codecs'... These libs should all be present in a normal installation of python.

When do you get this error? When running a solution? If so try to export your case to use my custom build of CodeAster: export the command file corresponding to your case, export the mesh in MEd3.2 format and run the CodeAster wizard to setup an ASTK job (ASTK is the old aster job manager) and try to run it from there.

Also, python can have weird issues if you use special (=non asci, for ex accents) characters in your username, home folder, solution folder, job name or any content in your Aster command file... This might cause the triggering of the encoding library that manages non-ascii character encodings.

Please Log in or Create an account to join the conversation.

  • Helio C
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
2 years 9 months ago #9296 by Helio C
Thank you very much, Mr Cugnoni, I will try the path you suggested as soon as possible.

Please Log in or Create an account to join the conversation.

  • Helio C
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
2 years 9 months ago #9298 by Helio C
Dear Mr. Cugnoni,

I exported the '.astk' file from the AsterStudy module and the mesh file '.med' from the Mesh module and the resulting log files are in the attachments.

File Attachment:

File Name: logprogress.txt
File Size:6 KB


File Attachment:

File Name: logastk.txt
File Size:273 KB


The complain I found most strange was about the lack of a 'config.txt', which indeed is in the directory tree.

As for the python complaints about lack of packages, I found no strange characters in the paths.

I will go ahead with the installation of the new drivers from NVidia to see if the 2018 version takes the stage.

Thank you very much for your attention.

Helio
Attachments:

Please Log in or Create an account to join the conversation.

  • Helio C
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
2 years 9 months ago - 1 year 3 months ago #9302 by Helio C
Dear Mr. Cugnoni,

I am so sorry, I made a mess in my first attempt with astk, using one that was *outside* the Salome-Meca tree.

Trying with the right one, with the 'comm' and 'med' files generated as before, the running got out with 'exit code=0', no errors.

But even after reinstalling the complete CAELinux 2017, which I did before finding the mess I made earlier, the SalomeMeca still gives the problem with the 'encodings' package, and I still have not found any strange name in the paths I saw in all the directories I searched in.

Well, at least I know how to make something work now.

Please, find attached the 'hdf' of the problem:

File Attachment:

File Name: Study1_SM2017.hdf.gz
File Size:17 KB


Thank you very much, and I apologize again by the wasted time.

Helio
Attachments:
Last edit: 1 year 3 months ago by Helio C.

Please Log in or Create an account to join the conversation.

Moderators: catux
Time to create page: 0.132 seconds
Powered by Kunena Forum