Skip to content

caching: pickle.load() fails #32

Description

@ZelenyMartin

Conditions

Cache level 3 needs to be enabled in ~/.nitrate:

[cache]
level = 3

Test suite fail

python -m nitrate.tests
Output from test suite (needs to be run as whole test suite - no just the CasePlan test case - it does not fail)

CasePlan
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sort key update ... ERROR
======================================================================
ERROR: Sort key update
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/mzeleny/Work/git/python-nitrate/venv/lib64/python3.8/site-packages/nitrate/tests.py", line 1230, in test_sortkey_update
cache.load()
File "/home/mzeleny/Work/git/python-nitrate/venv/lib64/python3.8/site-packages/nitrate/cache.py", line 298, in load
data = pickle.load(input_file)
TypeError: __new__() missing 1 required positional argument: 'object'
----------------------------------------------------------------------
Ran 1 test in 1.360s
FAILED (errors=1)

Production using fail

Traceback (most recent call last):
File "./progress-generator.py", line 296, in <module>
main()
File "./progress-generator.py", line 282, in main
dontRemoveCompose.append(updateComposeDetailPage(processedConfig['TCMS_STATUSES'], wikiPage, compose, tag))
File "./progress-generator.py", line 223, in updateComposeDetailPage
tcmsPart, exitCode = getTcmsInfo(tcmsStatuses, compose, tag)
File "./progress-generator.py", line 126, in getTcmsInfo
TRs=nitrate.TestRun.search(build__name=build, tag__name__contains=tag)
File "/usr/lib/python3.8/site-packages/nitrate/mutable.py", line 538, in search
return [TestRun(hash)
File "/usr/lib/python3.8/site-packages/nitrate/mutable.py", line 538, in <listcomp>
return [TestRun(hash)
File "/usr/lib/python3.8/site-packages/nitrate/base.py", line 311, in __new__
Cache()
File "/usr/lib/python3.8/site-packages/nitrate/cache.py", line 194, in __new__
cls._instance.__init__(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/nitrate/cache.py", line 203, in __init__
self.enter(filename)
File "/usr/lib/python3.8/site-packages/nitrate/cache.py", line 388, in enter
self.load()
File "/usr/lib/python3.8/site-packages/nitrate/cache.py", line 298, in load
data = pickle.load(input_file)
TypeError: __new__() missing 1 required positional argument: 'object'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions