Comments (5)
Ok, I understand finally what you want to.
If you want to use ByteArray type on AMF, it doesn't mean bytearray on Python.
ByteArray is AMF specific type, so, if you want to use it, you must use ByteArray class in lib.
See this page, line 363.
https://github.com/StdCarrot/Py3AMF/blob/master/pyamf/tests/test_amf3.py
There is how to use ByteArray in Py3AMF or PyAMF.
from py3amf.
It seems to use Python2.x
This project only support Python3.
Can you make sure where your code run on?
from py3amf.
Sorry, the above code may mislead you
The above code is run on Python2 using the pyamf library
I also tried it on python3, throwing the same exception
It's uses the py3amf library, And, I used Python3.5.4
Traceback (most recent call last):
File "C:/GitWorkSpace/comments_spider/py3rmf_test.py", line 72, in
data = ihotel_spider.construct_flex_message()
File "C:/GitWorkSpace/comments_spider/py3rmf_test.py", line 54, in construct_flex_message
bin_msg = remoting.encode(ev)
File "C:\Users\EDZ\Envs\spider\lib\site-packages\pyamf\remoting_init_.py", line 724, in encode
write_body(name, message, stream, encoder, strict)
File "C:\Users\EDZ\Envs\spider\lib\site-packages\pyamf\remoting_init.py", line 550, in _write_body
encode_body(message)
File "C:\Users\EDZ\Envs\spider\lib\site-packages\pyamf\remoting_init.py", line 523, in _encode_body
encoder.writeElement(x)
File "C:\Users\EDZ\Envs\spider\lib\site-packages\pyamf\codec.py", line 576, in writeElement
func(data)
File "C:\Users\EDZ\Envs\spider\lib\site-packages\pyamf\amf0.py", line 676, in writeAMF3
self.context.getAMF3Encoder(self).writeElement(data)
File "C:\Users\EDZ\Envs\spider\lib\site-packages\pyamf\codec.py", line 576, in writeElement
func(data)
File "C:\Users\EDZ\Envs\spider\lib\site-packages\pyamf\amf3.py", line 1509, in writeObject
self.writeElement(value)
File "C:\Users\EDZ\Envs\spider\lib\site-packages\pyamf\codec.py", line 576, in writeElement
func(data)
File "C:\Users\EDZ\Envs\spider\lib\site-packages\pyamf\amf3.py", line 1521, in writeObject
self.writeElement(value)
File "C:\Users\EDZ\Envs\spider\lib\site-packages\pyamf\codec.py", line 576, in writeElement
func(data)
File "C:\Users\EDZ\Envs\spider\lib\site-packages\pyamf\amf3.py", line 1500, in writeObject
attrs = alias.getEncodableAttributes(obj, codec=self)
File "C:\Users\EDZ\Envs\spider\lib\site-packages\pyamf\alias.py", line 404, in getEncodableAttributes
return obj.dict.copy()
AttributeError: 'bytearray' object has no attribute 'dict'
from py3amf.
Thanks for your answer, the problem was solved successfully
from py3amf.
Thanks for your answer, the problem was solved successfully
Hello
I has same issule with your met. Hope to get your help.
Would you please give me some demo code ,thanks.
from py3amf.
Related Issues (9)
- pyamf.DecodeError: Malformed stream (amfVersion=11822) HOT 1
- old release disappeared HOT 2
- Unable to decode error messages from AMF gateway (Static attributes %r expected when decoding %r)
- pyamf.DecodeError: Malformed stream (amfVersion=15423) HOT 1
- Dictionary and Vector Support HOT 2
- DeprecationWarning in Python 3.12
- Release version 0.8.7 in PyPi HOT 2
- Pytest deprecation warnings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py3amf.