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

Explicitly error out when module get loaded twice and the old one is used after #1398

Open
ninjapapa opened this issue Oct 10, 2018 · 3 comments

Comments

@ninjapapa
Copy link
Contributor

As discovered in #1392, there is a potential issue on Python 2.7 of calling TX.load and run an output module after call TX.allDataSets may fail on requiresDS (as return [None] ).

This issue is to

  1. Create a unittest to reproduce the issue, and
  2. To find a way to solve it
@ninjapapa
Copy link
Contributor Author

Issue was reproduces:

        m = self.smvApp.dsm.load('mod:stage5.modules.EmploymentByState')[0]
        allDs = self.smvApp.dsm.allDataSets()
        self.smvApp._module_rdd(m, collector)

Basically if a module is "loaded" then load again, the first loaded version will not be able to rdd on.

@ninjapapa
Copy link
Contributor Author

It is an expected behavior. However to help future development, we can

  • Improve the error message to explicitly point out that call load the second time discard the first time result
  • Make sure Python 3.6 also fails

@ninjapapa ninjapapa changed the title Investigate the potential python loading problem Explicitly error out when module get loaded twice and the old one is used after Oct 11, 2018
@ninjapapa
Copy link
Contributor Author

Changed the title to reflect what to be done.

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