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

Response frame, devices cannot open - python #3

Open
VA3ARY opened this issue Apr 19, 2020 · 3 comments
Open

Response frame, devices cannot open - python #3

VA3ARY opened this issue Apr 19, 2020 · 3 comments

Comments

@VA3ARY
Copy link

VA3ARY commented Apr 19, 2020

Hello,

I am trying to compile this code but I keep getting the error that no module named response frame. I have checked my submodule and it has all the files required. The import is not working for some reason. I checked the path and the code is in the integration test. I have tried everything the other post has suggested regarding the same issue. However, I am not using gr-satellites and trying to compile the base code in python and facing issues. Can someone suggest what I can do?

@Novakov
Copy link

Novakov commented Apr 19, 2020

As response_frames package is in submodule you need to add path to PWSat2OBC/integration_tests to Python search path by using sys.path.append() or PYTHONPATH environment variable

@VA3ARY
Copy link
Author

VA3ARY commented Apr 20, 2020

As response_frames package is in submodule you need to add path to PWSat2OBC/integration_tests to Python search path by using sys.path.append() or PYTHONPATH environment variable

Hey, the example.py which calls the payload_decoder.py does have the line which appends the integration path to the path. I am still getting the same error. When I try to check the path using the command print(os.environ['PYTHONPATH'].split(os.pathsep)) after line 15 in payload_decoder.py the response only returns the root directory address.

The bit of code that adds the path as copied from payload_decode.py is
sys.path.append(os.path.join(os.path.dirname(
file), '../PWSat2OBC/integration_tests'))
sys.path.append(os.path.join(os.path.dirname(file), '..'))

@VA3ARY
Copy link
Author

VA3ARY commented Apr 20, 2020

When I try to print Python path before the append and after the append, it gives me the same result. When I try to print sys.path before and after, I do see that the integration_tests is in the path and yet response_frames cannot be imported and the error reads no module found respone_frames.

I have posted both my prints below

before
PYTHONPATH_output : ['C:\\Users\\admin\\Desktop\\KJ_test']
sys.path_output: ['C:\\Users\\admin\\Desktop\\KJ_test\\FramePayloadDecoder_master', 'C:\\Users\\admin\\Desktop\\KJ_test', 'C:\\WINDOWS\\SYSTEM32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages']

after
PYTHONPATH_output : ['C:\\Users\\admin\\Desktop\\KJ_test']
sys.path_output:['C:\\Users\\admin\\Desktop\\KJ_test\\FramePayloadDecoder_master', 'C:\\Users\\admin\\Desktop\\KJ_test', 'C:\\WINDOWS\\SYSTEM32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Users\\admin\\Desktop\\KJ_test\\FramePayloadDecoder_master\\../PWSat2OBC/integration_tests', 'C:\\Users\\admin\\Desktop\\KJ_test\\FramePayloadDecoder_master\\..']

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