channel.exchange_declare(exchange='logs', type='fanout')
error:
Traceback (most recent call last):
File “D:/fanout_server.py”, line 12, in <module>
type=’fanout’)
TypeError: exchange_declare() got an unexpected keyword argument ‘type’
The reason is that the type parameter here must be specified as exchange_type
channel.exchange_declare(exchange='logs', exchange_type='fanout')
After the change, it runs normally, but strangely, some people have no problem specifying it with type. They don’t understand it
Similar Posts:
- Python Exception: TypeError: write() argument must be str, not list
- Android ADT tool Updated Error: TypeError: argument of type ‘NoneType’ is not iterable
- Python OpenCV TypeError: integer argument expected, got float
- JS Uncaught TypeError: Cannot read property ‘toLowerCase’ of undefined
- Python3: list dict set [UNK]unhashable type
- Solution to the problem of “TypeError: Assignment to constant variable”
- ES Error:”illegal_argument_exception” [How to Solve]
- Python bug problems and solutions sorted out in recent days
- [Solved] Elasticsearch:exception [type=search_phase_execution_exception, reason=all shards failed]
- How to use htmltestrunner.py to report importerror: no module named ‘stringio’ in Python 3