Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyYAML-3.11 out of date #1133

Open
ivannin49 opened this issue May 30, 2024 · 1 comment
Open

PyYAML-3.11 out of date #1133

ivannin49 opened this issue May 30, 2024 · 1 comment

Comments

@ivannin49
Copy link

ivannin49 commented May 30, 2024

Hi,

I am working on a Python script to automate the entire process of TRex execution (including the YAML file generation on the fly for the TRex server).

I was generating the YAML content in my Python script to have the YAML keys sorted by their appearance in the data script instead of by name. To do that, I used sort_keys option available in PyYAML dump function. The output that I am facing looks as follows:

image

In the above image you can see the detailed error and in addition to that, you can see the path where PyYAML is installed within TRex: /home/trex/v3.04/external_libs/pyyaml-3.11/python3/yaml/... Below is added this detail too.
image

Seeing this error, I wanted to start to use the PyYAML library hosted on my system (it is PyYaml 6.0.1) and installed with pip3 rather than the included with TRex but due to some environment variables added from TRex script base config I was facing the following error:
image

One option could be to change the environment variables but, it implies deep changes in the TRex base config which could provoke errors due to internal dependencies.

Seeing that, I worked to change the PyYAML external lib within the TRex repo from 3.11 to 6.0.1 (the newest). After that, I have been able to generate my YAML config as desired.

I would like to know why is being used an out of date version of PyYAML and in addition to that, I would like to suggest to update it to the last one as I did.

Thank you!

@Tsvetk
Copy link

Tsvetk commented Dec 11, 2024

Find 'pyyaml-3.11' and 'pyzmq-ctypes' - do comment it. install last python packets as usualy. work with python up to 3.11

#yaml_path = os.path.join('external_libs', 'pyyaml-3.11', python_ver)
#if yaml_path not in sys.path:
#    sys.path.append(yaml_path)`
#ZMQ_PATH            = os.path.join(EXT_LIBS_PATH, 'pyzmq-ctypes')
#YAML_PATH           = os.path.join(EXT_LIBS_PATH, 'pyyaml-3.11', python_ver)

#{'name': 'pyyaml-3.11', 'py-dep': True},
#{'name': 'pyzmq-ctypes'},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants