Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while retrieving the device session #3

Open
Gillani0 opened this issue Apr 24, 2020 · 5 comments
Open

Error while retrieving the device session #3

Gillani0 opened this issue Apr 24, 2020 · 5 comments

Comments

@Gillani0
Copy link

Hi,

I can send the Data Push join message and receive and parse its response correctly with correct mic. However, when it tries to save the session I get the following error:

ERROR - can't pickle memoryview objects

This is during self.save() operation.

Syed

@houluy
Copy link
Owner

houluy commented Apr 25, 2020

Would you please show the whole error message or locate the exception position in code? I didn't encounter such an error. This may cost by a bug. I use memoryview in some process to save processing time, but when it comes to pickle (actually it shouldn't appear in pickle process), the memoryview object should be casted into bytes to be pickled.

@Gillani0
Copy link
Author

Hi following is the error trace

 - ERROR - can't pickle memoryview objects

Traceback (most recent call last):
  File "main.py", line 98, in main
    gateway.push(udp_client, phypld, mote)
  File "/lora-motes-emulator/motes/mac.py", line 304, in push
    self.parse_pullresp(pullresp[0], mote)
  File "/lora-motes-emulator/motes/mac.py", line 372, in parse_pullresp
    self.parse_txpk(txpk, mote)
  File "/lora-motes-emulator/motes/mac.py", line 416, in parse_txpk
    mote.parse_phypld(phypld)
  File "/lora-motes-emulator/motes/mac.py", line 1189, in parse_phypld
    self.parse_joinacpt(mhdr, macpld, mic)
  File "/lora-motes-emulator/motes/mac.py", line 1125, in parse_joinacpt
    self._initialize_session(optneg)
  File "/lora-motes-emulator/motes/mac.py", line 490, in _initialize_session
    self.save()
  File "/lora-motes-emulator/motes/mac.py", line 535, in save ```

@houluy
Copy link
Owner

houluy commented May 16, 2020

The bug has been fixed.

@Gillani0
Copy link
Author

Thanks @houluy it seems to be fixed.

However, I've found other issues in your documentations and Join algorithm.
Do you mind if I send a pull request? Cheers

@houluy
Copy link
Owner

houluy commented May 20, 2020

@Gillani0 Please ~ I'm very appreciated! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants