Import packaged mojopkg failed.

I packaged a hello world mojopkg but I failed to import it. Please help.
No description
5 Replies
mad alex 1997
mad alex 199715mo ago
Rename the main function to something else then repackage the thing. I have had success with packaging but I assume that a function named main will work similiarly to how it works in C++ or if __name__ == "__main__:" in python
drunkwcodes
drunkwcodesOP15mo ago
1> from hello import hello_func
2.
2> hello_func()
3.
lldb: /__w/modular/modular/third-party/llvm-project/llvm/include/llvm/Support/Casting.h:578: decltype(auto) llvm::cast(From *) [To = M::KGEN::GeneratorOp, From = mlir::Operation]: Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
[11236:11236:20230916,015003.609114:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[11236:11236:20230916,015003.609195:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[11236:11236:20230916,015003.617119:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[11236:11236:20230916,015003.617160:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
1> from hello import hello_func
2.
2> hello_func()
3.
lldb: /__w/modular/modular/third-party/llvm-project/llvm/include/llvm/Support/Casting.h:578: decltype(auto) llvm::cast(From *) [To = M::KGEN::GeneratorOp, From = mlir::Operation]: Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
[11236:11236:20230916,015003.609114:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[11236:11236:20230916,015003.609195:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[11236:11236:20230916,015003.617119:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[11236:11236:20230916,015003.617160:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
Still...
mad alex 1997
mad alex 199715mo ago
is the package name different from the original and unique in that folder?
drunkwcodes
drunkwcodesOP15mo ago
yeah, it's unique. I didn'didn't try to change hello name.
ViynShade
ViynShade15mo ago
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory - listing OS might be helpfull in solving this issue
Want results from more Discord servers?
Add your server