Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P piuparts
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • DebianDebian
  • piuparts
  • Merge requests
  • !23

piuparts-report: fix pickle.loading str from python2

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Nis Martensen requested to merge nma/piuparts:old_pickles into develop Dec 29, 2019
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 1

piuparts-report may encounter old md5cache files pickled by python2 in text mode. Loading such files may fail if there are non-ascii characters. The existing cache files involved in generating the reports on piuparts.debian.org most likely use utf-8 encoding, so let's use that instead of the default assumption 'ascii'.

Should fix:

Traceback (most recent call last):
  File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1911, in <module>
    main()
  File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1851, in main
    section.generate_output(output_directory, section_names, problem_list, web_host)
  File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1660, in generate_output
    self.generate_html()
  File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1563, in generate_html
    self._md5cache['old'] = pickle.load(f)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 71: ordinal not in range(128)
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: old_pickles