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

remove_path causes an errror when module loading and unloading #675

Closed
francinelapid opened this issue Nov 8, 2023 · 3 comments
Closed

Comments

@francinelapid
Copy link

francinelapid commented Nov 8, 2023

Describe the bug
module load-ing two modulefiles that use remove_path will cause an error when one of them is eventually attempted to be unloaded.

To Reproduce

  1. Create 2 modulefiles that use remove_path
  2. module load both modulefiles
  3. module unload either of the modulefiles

This will result in an error similar to:

$ module unload remove_another_path 
Lmod has detected the following error: Unable to load module because of error
when evaluating modulefile:
     .../remove_path.lua:
...Lmod-8.7.32/src/MainControl.lua:339: attempt to
call a nil value (method 'trim')
     Please check the modulefile and especially if there is a line number
specified in the above message 
While processing the following module(s):
    Module fullname  Module Filename
    ---------------  ---------------
    remove_path      ...

Desktop (please complete the following information):

  • OS: Linux
  • Linux distribution: SLES
  • Lmod Version: 8.7.32
  • For Lmod Versions 8.7.7+, please run "module --miniConfig" and
    include the output here.

At the moment, we have a patch in place that changes the remove_path dependency to MainControl.quiet in MC_DependencyCk.lua (#670). This fixes the error for us.

@rtmclay
Copy link
Member

rtmclay commented Nov 12, 2023

That was the correct fix. Thanks for the bug report. Please use the version from the testing branch to see if works for you.

@rtmclay
Copy link
Member

rtmclay commented Feb 2, 2024

O.K. to close this issue?

@francinelapid
Copy link
Author

Yes, this issue can be closed. Thanks!

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