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

[Bug]: Fix error in pull_licenses_py.py for Python 3.11 #26017

Closed
1 of 15 tasks
AnandInguva opened this issue Mar 28, 2023 · 1 comment · Fixed by #26019
Closed
1 of 15 tasks

[Bug]: Fix error in pull_licenses_py.py for Python 3.11 #26017

AnandInguva opened this issue Mar 28, 2023 · 1 comment · Fixed by #26019
Assignees
Labels
bug done & done Issue has been reviewed after it was closed for verification, followups, etc. P2 python

Comments

@AnandInguva
Copy link
Contributor

What happened?

Console log: https://ci-beam.apache.org/job/beam_PostCommit_Python311_PR/3/consoleFull

Traceback (most recent call last):
#25 3.754   File "/usr/local/bin/pip-licenses", line 8, in <module>
#25 3.754     sys.exit(main())
#25 3.754              ^^^^^^
#25 3.754   File "/usr/local/lib/python3.11/site-packages/piplicenses.py", line 900, in main
#25 3.755     output_string = create_output_string(args)
#25 3.755                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
#25 3.755   File "/usr/local/lib/python3.11/site-packages/piplicenses.py", line 558, in create_output_string
#25 3.755     table = create_licenses_table(args, output_fields)
#25 3.755             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#25 3.755   File "/usr/local/lib/python3.11/site-packages/piplicenses.py", line 303, in create_licenses_table
#25 3.755     for pkg in get_packages(args):
#25 3.755   File "/usr/local/lib/python3.11/site-packages/piplicenses.py", line 254, in get_packages
#25 3.755     pkg_name = pkg.project_name
#25 3.755                ^^^^^^^^^^^^^^^^
#25 3.755 AttributeError: 'PathDistribution' object has no attribute 'project_name'
#25 3.824 Traceback (most recent call last):
#25 3.824   File "/tmp/license_scripts/pull_licenses_py.py", line 167, in <module>
#25 3.824     dependencies = run_pip_licenses()
#25 3.824                    ^^^^^^^^^^^^^^^^^^
#25 3.824   File "/tmp/license_scripts/pull_licenses_py.py", line 49, in run_pip_licenses
#25 3.824     dependencies = run_bash_command(command)
#25 3.824                    ^^^^^^^^^^^^^^^^^^^^^^^^^
#25 3.824   File "/tmp/license_scripts/pull_licenses_py.py", line 44, in run_bash_command
#25 3.824     return subprocess.check_output(command.split()).decode('utf-8')
#25 3.824            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#25 3.824   File "/usr/local/lib/python3.11/subprocess.py", line 466, in check_output
#25 3.824     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
#25 3.824            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#25 3.824   File "/usr/local/lib/python3.11/subprocess.py", line 571, in run
#25 3.825     raise CalledProcessError(retcode, process.args,
#25 3.825 subprocess.CalledProcessError: Command '['pip-licenses', '--with-license-file', '--with-urls', '--from=mixed', '--ignore', 'apache-beam', '--format=json']' returned non-zero exit status 1.
#25 ERROR: executor failed running [/bin/sh -c if [ "$pull_licenses" = "true" ] ; then       pip install 'pip-licenses<4.0.0' pyyaml tenacity &&       python /tmp/license_scripts/pull_licenses_py.py ;     fi]: exit code: 1

Pull licenses fails with the above error.

Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner
@AnandInguva
Copy link
Contributor Author

.take-issue

@github-actions github-actions bot added this to the 2.47.0 Release milestone Mar 28, 2023
@damccorm damccorm added the done & done Issue has been reviewed after it was closed for verification, followups, etc. label Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug done & done Issue has been reviewed after it was closed for verification, followups, etc. P2 python
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants