fedora-infra / the-new-hotness

A fedora messaging consumer that files bugzilla bugs for upstream releases
https://release-monitoring.org
GNU Lesser General Public License v2.1
43 stars 32 forks source link

module 'hashlib' has no attribute 'sha256sum' #566

Closed tmzullinger closed 1 year ago

tmzullinger commented 1 year ago

In rhbz#2208089, the-new-hotness raised this error while trying to run a scratch build:

Scratch build failed. Details below:

AttributeError: module 'hashlib' has no attribute 'sha256sum'
Traceback:
  File
"/usr/local/lib/python3.11/site-packages/hotness/use_cases/package_scratch_build_use_case.py",
line 56, in build
    result = self.builder.build(request.package, request.opts) 
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hotness/builders/koji.py", line
235, in build
    output["build_id"] = self._scratch_build(session, package.name, srpm)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hotness/builders/koji.py", line
451, in _scratch_build
    session.uploadWrapper(source, serverdir)
  File "/usr/lib/python3.11/site-packages/koji/__init__.py", line 3252, in
uploadWrapper
    sha256sum = hashlib.sha256sum()
                ^^^^^^^^^^^^^^^^^

Perhaps this is due to a recent RHEL upgrade or something?

tmzullinger commented 1 year ago

Or now that I think about it, possibly a transient error due to the planned outage of various Fedora services. Though in that case, it would still be good to report this in some way other than tossing a traceback into bugzilla. ;)

Zlopez commented 1 year ago

The traceback is generated every time we don't know what exactly happened. If the error is something we can recover from it's gracefully handled. Before the traceback was attached to bugzilla issue, it was hard to troubleshoot the issues.

I will look if this occured multiple times.

Zlopez commented 1 year ago

It seems that this was just a rare occurence, I don't see any other failing scratch build in the logs with the same error. Not sure what happened in this case, but if this was really a bug, it would happen on every scratch build.

Closing this.