AttributeError'str'对象没有属性'read'

I want to integrate my existing PHP app with new Django framework. I am using the django-php-bridge https://github.com/winhamwr/django-php-bridge

What i want is to be authenticated into the django app by using existing PHP authentication method. I am able to generate session key by PHP and want to put it on Django Session table using the bridge. but i am running into errors. can you suggest a better alternative to the problem ?

 def _unserialize():
        type_ = fp.read(1).lower()
        if type_ == b'n':
            _expect(b';')
            return None
        if type_ in b'idb':
            _expect(b':')
            data = _read_until(b';')
            if type_ == b'i':
                return int(data)
            if type_ == b'd':
                return float(data)
            return int(data) != 0
        if type_ == b's':
            _expect(b':')
            length = int(_read_until(b':'))
            _expect(b'"')
            data = fp.read(length)
            _expect(b'"')
            if decode_strings:

Request Method: | GET
-- | --
http://localhost:8000/
2.2.2
AttributeError
'str' object has no attribute 'read'
C:\xampp\htdocs\test\dbs\env\lib\site-packages\phpserialize.py in _unserialize, line 473
C:\xampp\htdocs\test\dbs\env\Scripts\python.exe
3.7.3
['C:\\xampp\\htdocs\\test\\dbs',  'C:\\xampp\\htdocs\\test\\dbs\\env\\Scripts\\python37.zip',  'C:\\xampp\\htdocs\\test\\dbs\\env\\DLLs',  'C:\\xampp\\htdocs\\test\\dbs\\env\\lib',  'C:\\xampp\\htdocs\\test\\dbs\\env\\Scripts',  'c:\\users\\arjun soota\\appdata\\local\\programs\\python\\python37-32\\Lib',  'c:\\users\\arjun soota\\appdata\\local\\programs\\python\\python37-32\\DLLs',  'C:\\xampp\\htdocs\\test\\dbs\\env',  'C:\\xampp\\htdocs\\test\\dbs\\env\\lib\\site-packages']
Thu, 20 Jun 2019 11:46:50 +0530