Open johns10 opened 6 years ago
The offending line is:
from haigha.connection import Connection
Changed lines 72-76 in frame.py:
except Reader.ReaderError as e:
# Some other format error
raise (Frame.FormatError, str(e), sys.exc_info()[-1])
except struct.error as e:
raise (Frame.FormatError, str(e), sys.exc_info()[-1])
Commented line 280 and 283 in writer.py (I think these types are depreciated in python 3)
Commented line 19 in connection.py (I think exceptions is rolled in to core)
After that the import statement worked - gonna go see if I can get the thing rolling. Sorry I'm not sharp enough to do a diff or anything like that for you guys.
Also changed iteritems to items in writer.py (line 188) and channel.py (line 65).
Changed line 144 to:
if isinstance(s, str):
in writer.py
The next error was:
File "code/webserver.py", line 21, in <module>
connection = Connection(user='user',password='pass',vhost='/vhost', host='rabbitmq:5672', hearbeat=None, debug=True)
File "/usr/local/lib/python3.7/site-packages/haigha/connection.py", line 107, in __init__
{'LOGIN': self._user, 'PASSWORD': self._password})
File "/usr/local/lib/python3.7/site-packages/haigha/writer.py", line 189, in write_table
self._write_item(key, value)
File "/usr/local/lib/python3.7/site-packages/haigha/writer.py", line 198, in _write_item
self.write_shortstr(key)
File "/usr/local/lib/python3.7/site-packages/haigha/writer.py", line 146, in write_shortstr
self.write_octet(len(s))
File "/usr/local/lib/python3.7/site-packages/haigha/writer.py", line 81, in write_octet
self._output_buffer.append(pack(n))
TypeError: an integer is required
I'm assuming this isn't fully converted to python 3?
After installing haigha with pip I get:
I tested this on my local machine (win 10/python 3.7), and on a python:3.7-alpine docker build: