This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Kirill Matsaberydze
Recipients Kirill Matsaberydze, alexandre.vassalotti, georg.brandl, jaraco, sbt, slallum, zseil
Date 2018-04-12.15:07:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1523545621.29.0.682650639539.issue32696@psf.upfronthosting.co.za>
In-reply-to
Content
Hi, I encounter similar behavior in python 3.6.5 with following code:

import pickle
class CustomException(Exception):
    def __init__(self, arg1, arg2):
        msg = "Custom message {} {}".format(arg1, arg2)
        super().__init__(msg)


obj_dump = pickle.dumps(CustomException("arg1", "arg2"))
obj = pickle.loads(obj_dump)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__() missing 1 required positional argument: 'arg2'

So it looks like it not only python 2.7 problem
History
Date User Action Args
2018-04-12 15:07:01Kirill Matsaberydzesetrecipients: + Kirill Matsaberydze, georg.brandl, jaraco, zseil, alexandre.vassalotti, sbt, slallum
2018-04-12 15:07:01Kirill Matsaberydzesetmessageid: <1523545621.29.0.682650639539.issue32696@psf.upfronthosting.co.za>
2018-04-12 15:07:01Kirill Matsaberydzelinkissue32696 messages
2018-04-12 15:07:01Kirill Matsaberydzecreate