You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but if i include the 'req["Class"] = rclass', it generate traceback
Traceback (most recent call last):
File "/opt/flaskradius/./test_acct.py", line 35, in <module>
req["Class"] = rclass
File "/opt/flaskradius/venv/lib/python3.9/site-packages/pyrad/packet.py", line 359, in __setitem__
(key, item) = self._EncodeKeyValues(key, item)
File "/opt/flaskradius/venv/lib/python3.9/site-packages/pyrad/packet.py", line 279, in _EncodeKeyValues
return (key, [self._EncodeValue(attr, v) for v in values])
File "/opt/flaskradius/venv/lib/python3.9/site-packages/pyrad/packet.py", line 279, in <listcomp>
return (key, [self._EncodeValue(attr, v) for v in values])
File "/opt/flaskradius/venv/lib/python3.9/site-packages/pyrad/packet.py", line 254, in _EncodeValue
result = tools.EncodeAttr(attr.type, value)
File "/opt/flaskradius/venv/lib/python3.9/site-packages/pyrad/tools.py", line 185, in EncodeAttr
return EncodeOctets(value)
File "/opt/flaskradius/venv/lib/python3.9/site-packages/pyrad/tools.py", line 24, in EncodeOctets
if str.startswith(b'0x'):
TypeError: startswith first arg must be str or a tuple of str, not bytes
As far as I know, the Radius 'Class' Attribute is a string, and I generate it with --> str(uuid4()).
I need to include 'Class' since I'm trying to build a Flask based app as backend of FreeRadius.
Kindly please tell me how to include 'Class' in radius Accounting Request.
Sincerely
-bino-
The text was updated successfully, but these errors were encountered:
Dear All
I make a small modification to https://github.com/pyradius/pyrad/blob/master/example/acct.py to make it send a 'start', some 'Interim-update', and 'stop'
here it is
it work without problem.
but if i include the 'req["Class"] = rclass', it generate traceback
As far as I know, the Radius 'Class' Attribute is a string, and I generate it with --> str(uuid4()).
I need to include 'Class' since I'm trying to build a Flask based app as backend of FreeRadius.
Kindly please tell me how to include 'Class' in radius Accounting Request.
Sincerely
-bino-
The text was updated successfully, but these errors were encountered: