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

Refresh sys.path after lib install #1235

Merged

Conversation

dmohns
Copy link
Contributor

@dmohns dmohns commented Nov 21, 2023

Resolves: #1227, #1221

Scope

This tries to make progress on the error described in #1221

The root cause seems to be that after pip install in a subprocess the module in not added to the "context" in which the script was initially started in. Users hence have to "restart" the script to make the module discoverabled.

I found a way where this restart is no necessary which is essentially a copy from here:

Test Procedure

This is how I tested my changes:

docker build -t local-gateway docker && docker run local-gateway

@CLAassistant
Copy link

CLAassistant commented Nov 21, 2023

CLA assistant check
All committers have signed the CLA.

@imbeacon imbeacon merged commit c802a52 into thingsboard:master Nov 22, 2023
1 check passed
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

Successfully merging this pull request may close these issues.

[BUG] Missing Python Modules in ThingsBoard Gateway (pymodbus and twisted)
3 participants