Error with brine module. AttributeError: class does not have attribute '__new__'

I have been using python and Abaqus for a long time. But when I upgraded my python from 2.7 to 3.5.2, some error occurs. I am trying to rekindle some object A of my class.

    f = open(utilsDir + "aclass.log", 'wb')
    pickle.dump(A,f,protocol=2)
    f.close()

and then paste it with python abaqus, which is still 2.7.

    filepath = utilsDir + 'aclass.log'
    A1 = pickle.load(file(filepath))

All this worked before updating my python, but now I have an error:

enter image description here

+4
source share
1 answer

, OP, , - , , , , Python 2, , .. object.

+1

Source: https://habr.com/ru/post/1660031/


All Articles