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

ValueError when running CFDP receiver before sender #93

Open
bruceplai opened this issue Nov 6, 2019 · 0 comments
Open

ValueError when running CFDP receiver before sender #93

bruceplai opened this issue Nov 6, 2019 · 0 comments

Comments

@bruceplai
Copy link

Run a cfdp transfer test (in either py 2.7 or py 3.7)
-In one terminal run ait_cfdp_start_receiver and leave it running
-In another terminal run ait_cfdp_start_sender.py

You will see errors like the captured sample below:

2019-11-06T09:56:13.304 | INFO | Receiver 2: Received FILE DATA PDU event
2019-11-06T09:56:13.305 | INFO | Writing file data to file /Users/blai/projects/ait-core/ait/dsn/cfdp/datasink/tempfiles/tmp_transfer_2_1 with offset 24576
2019-11-06T09:56:13.392 | WARNING | EXCEPTION: 105 is not a valid FileDirective
2019-11-06T09:56:13.393 | WARNING | Traceback (most recent call last):
File "/Users/blai/projects/ait-dsn/ait/dsn/cfdp/cfdp.py", line 287, in read_pdus_from_socket
pdu = make_pdu_from_bytes(pdu_bytes)
File "/Users/blai/projects/ait-dsn/ait/dsn/cfdp/pdu/util.py", line 62, in make_pdu_from_bytes
directive_code = FileDirective(pdu_body[0])
File "/Users/blai/.virtualenvs/p2/lib/python2.7/site-packages/enum/init.py", line 347, in call
return cls.new(cls, value)
File "/Users/blai/.virtualenvs/p2/lib/python2.7/site-packages/enum/init.py", line 662, in new
raise ValueError("%s is not a valid %s" % (value, cls.name))
ValueError: 105 is not a valid FileDirective

2019-11-06T09:56:13.507 | INFO | Receiver 2: Received FILE DATA PDU event
2019-11-06T09:56:13.508 | INFO | Writing file data to file /Users/blai/projects/ait-core/ait/dsn/cfdp/datasink/tempfiles/tmp_transfer_2_1 with offset 28672
2019-11-06T09:56:13.604 | WARNING | EXCEPTION: pdu header should be at least 4 bytes long
2019-11-06T09:56:13.604 | WARNING | Traceback (most recent call last):
File "/Users/blai/projects/ait-dsn/ait/dsn/cfdp/cfdp.py", line 287, in read_pdus_from_socket
pdu = make_pdu_from_bytes(pdu_bytes)
File "/Users/blai/projects/ait-dsn/ait/dsn/cfdp/pdu/util.py", line 58, in make_pdu_from_bytes
header = Header.to_object(pdu_bytes)
File "/Users/blai/projects/ait-dsn/ait/dsn/cfdp/pdu/header.py", line 230, in to_object
raise ValueError('pdu header should be at least 4 bytes long')
ValueError: pdu header should be at least 4 bytes long

@aywaldron aywaldron changed the title ValueError when running receiver before sender ValueError when running CFDP receiver before sender Dec 18, 2019
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

1 participant