Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In [1]: exec_wait(agwlib.send_V,1,'CR7ALW','CQ',['WIDE-2'])
- <class 'str'>
- ---------------------------------------------------------------------------
- TypeError Traceback (most recent call last)
- D:\Documentos\Python\APRS\tests.py in <module>()
- ----> 1 exec_wait(agwlib.send_V,1,'CR7ALW','CQ',['WIDE-2'])
- D:\Documentos\Python\APRS\tests.py in exec_wait(func, *args)
- 37
- 38 def exec_wait(func,*args):
- ---> 39 data=func(*args)
- 40 print(data)
- 41 s.send(data)
- D:\Documentos\Python\APRS\agwlib.py in send_V(port, self, other, VIA, PID)
- 189 VIA_data+=str.encode(elem)+b'\x00'
- 190 print(type(other))
- --> 191 return pack(port, self, other, VIA_data, PID)
- 192
- 193 def send_c(port, self, other, PID):
- D:\Documentos\Python\APRS\agwlib.py in pack(Port, DataKind, CallFrom, CallTo, data, PID)
- 75 packet+=b'\x00' #Reserved
- 76 packet+=packCall(CallFrom)
- ---> 77 packet+=packCall(CallTo)
- 78 packet+=struct.pack('<I', len(data)) #32 uint, data_len
- 79 packet+=b'\x00\x00\x00\x00' #User(reserved) 32 bits unsigned integer, not used. Reserved for future use
- D:\Documentos\Python\APRS\agwlib.py in packCall(call)
- 56 #Basic functions----------------------------------------------------------------
- 57 def packCall(call):
- ---> 58 result=str.encode(call)
- 59 while len(result)<10: #10 Acording to the API
- 60 result+=b'\x00'
- TypeError: descriptor 'encode' requires a 'str' object but received a 'bytes'
- In [2]:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement