22,711 questions
-2
votes
1
answer
62
views
ESM & CommonJS Dual Support in an Existing Node.js Project [duplicate]
I'm updating a Node.js project to support both CommonJS and ES Modules (Dual Package).
My current issue appears when trying to load the module from the project root using exports field instead of main....
3
votes
1
answer
116
views
When is the definition of an exported function available to an importing TU?
Consider the following translation unit:
export module Example;
export inline void fn1();
export void fn2();
export void fn3();
void fn1() {}
void fn2() {}
module :private;
void fn3() {}
Firstly, ...
1
vote
0
answers
93
views
Run JavaScript in Python wrapper: problem by module calling [closed]
I try to execute the follow code fragment (actually the calling of JavaScript module inside of the python code):
from py_mini_racer import MiniRacer
ctx = MiniRacer()
ctx.eval("""
...
1
vote
2
answers
126
views
pytorch Module B=A, A.to('cpu'), but the tensor in B is still in GPU, why?
After converting module A to CPU, the origin parameter tensor still stays on the GPU? When it is released? Is it wrong if I reuse the parameter?
My code:
import torch.nn as nn
class A(nn.Module):
...
-2
votes
2
answers
80
views
Change in module behavior for clang in GitHub
I've inherited a GitHub job I don't understand well and that has stopped compiling.
It creates a .a library for iOS.
The source consists of a set of modules, each declared thus:
export module x;
...
0
votes
2
answers
72
views
python: vscode doesnt highlight direct import from module
When I attempt to import a module from a local package (from core import config), VSCode's syntax highlighting isn't working. When hovering over config, it shows "config: Any" (the editor ...
1
vote
1
answer
46
views
Trying to build Python extension (module) with Dlang and pyd with dub + ldc2
I am trying to build a Python extension (module) with D and the pyd (https://github.com/ariovistus/pyd) and dub and ldc2 compiler on Windows.
I have the following dub.sdl:
name "hello"
...
0
votes
0
answers
87
views
Why does Visual Studio mention the symbol loading to be disabled by Include/Exclude setting? [duplicate]
I'm debugging a C++ program, and in order to do that, I'd like to have a look at objects, defined in imported libraries. However, the "Modules" window mentions some symbols not to be loaded ...
1
vote
1
answer
124
views
How do I convert a JavaFX application into an executable .jar file with all dependencies included?
I’ve built a modular JavaFX application using JDK 21 and JavaFX SDK 21.0.1. The project runs perfectly inside my IDE (IntelliJ IDEA), but when I try to export it as a .jar file and run it outside the ...
1
vote
1
answer
75
views
Ray: Resource request cannot be scheduled — using offline data and enabled the RL module
I tried training a BC algorithm using offline data and enabled the RL module in the algorithm configuration. I ran the code on Google Colab, which only provides 2 CPUs, and encountered the following ...
7
votes
1
answer
101
views
Detect leaking of private types which are only public in their module
Suppose I have a Rust crate mycrate with lib.rs:
mod internal {
pub struct X();
pub fn x() -> X {
X()
}
}
pub use internal::x;
This works fine on Rust 2024 and any consumer ...
0
votes
0
answers
29
views
Wordpress assets loading. Uncaught TypeError: Failed to resolve module specifier
I hope you can help me with one, it's drivinig me crazy :(
I recently splitted a giant file called admin.js into many modules, using these two WordPress functions:
wp_register_script_module
...
3
votes
1
answer
136
views
pycharm seems to load some modules BEFORE my own code
In a blank new PyCharm Project I create a file "runner.py" with following code:
import random
print(random.random())
Next to this file I create a file "random.py" which stays ...
1
vote
0
answers
119
views
How to make #[cfg(test)] gated code in one module, visible to #[cfg(test)] code in another module in Rust?
I have some code I am working on that has a certain struct object Permissions:-
// Stores permissions with a bit flag
/// 1 << ? - Vote - Anyone with a weight > 0 can vote.
/// 1 << ? -...
0
votes
1
answer
110
views
Why does Streamlit throw "ImportError: cannot import name 'get_all_transactions_by_user' from 'db'" even though the function exists?
I’m building a personal finance management app in Streamlit with multiple pages (dashboard.py, transactions.py, budget.py, export.py). I have a db.py file that contains all database functions, ...
2
votes
1
answer
62
views
FastAPI won't recognize module changes
I keep my SQL hooks in a separate module. I added a function, and for the life of me I cannot get it to be registered in the fastAPI. I can alter the main file of the fast API, but it just keeps ...
0
votes
2
answers
117
views
How do I import package when running
I have a directory structure that can be simplified like this:
test/
scripts/
a.py
src/
b.py
In a.py, I have the line:
import src.b
If I'm in the test directory, I want this ...
0
votes
0
answers
79
views
Why Odoo custom module code changes are not reflected in website?
I’m building a website using a custom Odoo module. I created a hero section on the homepage, and I can see it correctly at localhost:8070.
The issue is that after making several changes and adding new ...
1
vote
1
answer
93
views
Angular Module Export Not Recognized
I am creating a new website in Angular V20. I have created a new module and added a new component to the module declarations and exports. I am exporting the component in its script. When I attempt to ...
2
votes
1
answer
52
views
vscode breakpoints in an imported module do not work suddenly [closed]
I encountered a weird problem about vscode breakpoints for python in an imported module.
The module is in the subfolder 'src' of the working folder of the main program 'main.py'.
Then the main program ...
-3
votes
1
answer
62
views
whenever I atteempt to install a module I get an error
Currently trying to make voice commands for my PC. Whenever I try to install any module's, I get WARNING: Ignoring invalid distribution ~ (C:\Users\Username\AppData\Local\Programs\Python\Python311\Lib\...
0
votes
0
answers
45
views
Can i modifiy the priority when loading more than one linux module?
I'm doing a Linux kernel module which every time a keyboard is plugged in it prints a message like "Keyboard connected!"
#include <linux/module.h>
#include <linux/kernel.h>
#...
0
votes
1
answer
93
views
Change module name displayed by Rust log macros to be from calling code for auxiliary functions
My goal
I'm trying to make my actix-web code more readable and came up with the idea that I want to extend Result with methods that transform errors into actix specific ones with status code etc. (so ...
3
votes
1
answer
73
views
TypeError: unsupported operand type(s) for +: 'SQL' and 'str'
Issue:
I'm encountering a TypeError: unsupported operand type(s) for +: 'SQL' and 'str' when trying to install an Odoo module that was working fine in Odoo 17, but now has issues after migrating it to ...
1
vote
1
answer
84
views
vscode can't run program in playground ... says it can't find module on github
I have a helloWorld program with a package
helloWorld
|----- morestrings
|------- reverse.go
|------- reverse_test.go
|--- hello.go
|--- go.mod
...
0
votes
0
answers
32
views
intall a submodule before build if it is not exist yet?
I have a multi-module project. The whole point of the project is to provide a parent pom for other projects to do a specific way of build, which depends on an artifact created one of the modules. ...
1
vote
0
answers
46
views
Create an Module Federation monorepo React projects using the Nx CLI with electron app
console error image
Create an Module Federation monorepo React projects using the Nx CLI - npx nx
g @nx/react:host apps/erp--remotes=hr,pm,crm
installed nx-electron using nx g nx-electron:app ...
0
votes
1
answer
60
views
Can tcsh users reliably use conda packages with .sh activate/deactivate hooks but no .csh alternative?
My site has a huge amount of infrastructure for configuring project environments using tcsh. I'm trying to add conda environments for managing packages.
In particular I'm using Miniforge-25.5.1 and ...
1
vote
1
answer
76
views
UnknownDependenciesException [Error]: Nest can't resolve dependencies of the MysqlAgendaRepository (?)
Im getting "[ExceptionHandler] UnknownDependenciesException [Error]: Nest can't resolve dependencies of the MysqlAgendaRepository (?). Please make sure that the argument "AgendaRepository&...
3
votes
1
answer
99
views
Can i use the using: scope modifier for a script block executed in a module function
If a have Powershell function, like
function invoke-sb1 ([scriptBlock] $sb) {
invoke-command -computerName abc -credential (get-cred.ps1) -scriptBlock $sb
}
and then invoke the function from ...
0
votes
0
answers
55
views
ASSERTION ERROR: NgModule '_App' is not a subtype of 'NgModuleType'
I am having an Angular project with native federation and I have some problems here. I have error here. When I config routes to make shell connect to all components in a remote I have errors
ERROR ...
0
votes
0
answers
55
views
Could not build Objective-C module 'TensorFlowLiteSelectTfOps'
I'm working on an iOS project where I need to use both TensorFlowLiteSwift and TensorFlowLiteSelectTfOps. I installed them via CocoaPods by including the following in my Podfile:
pod '...
4
votes
2
answers
144
views
Usage of exported inline variables in c++20 modules
Is there any use of exported inline variables in c++20 modules?
Is there any difference between
export constexpr auto val1 = 0;
export const auto val2 = 0;
export auto val3 = 0;
and
export inline ...
1
vote
1
answer
152
views
Refer to a class in Ruby
In Ruby I create a module like this:
Mod = Module.new do
class MyClass
attr_reader :a
def initialize(a)
@a = a
end
end
end
And I'm trying to create an instance of the class:
...
0
votes
1
answer
43
views
What does :| mean in g++ generated .d file
I encountered the following line in a g++ generated .d file
"/home/test/file27.gcm":| /home/test/file27.o
What does ':|' means compared to ':'
I could not find any mention of it in gnu make ...
-1
votes
3
answers
132
views
I need to import a function from a file in vscode using python but "module not found error" error happening
I have a workspace with different projects as shown below.
I have a code in my main_scripts.py which is under main_scripts sub folder that needs to call a function inside the file config_reader.py ...
0
votes
0
answers
106
views
KASAN based on MTE on Android Pixel 8 does not work
I am working on a Pixel 8 device running CalyxOS. uname -a: Linux localhost 5.15.137-android14-11-gbc062a78e195-ab12057991 #1 SMP PREEMPT Mon Jul 8 12:34:46 UTC 2024 aarch64 Toybox.
The device ...
0
votes
1
answer
86
views
Header includes in global module fragment not propagated to other files
I have two modules:
module;
#include <cerrno>
#include <streambuf>
#include <nlohmann/json.hpp>
#include <nlohmann/json_fwd.hpp>
export module Utils:JsonSerializable;
...
1
vote
1
answer
122
views
Lua interpreter cannot find "json" module
I installed json-lua with luarocks install --local json-lua. Now when I run eval $(luarocks path) and require it from within the interpeter it can't find it. Here's my workflow:
(base) user@USR-0318:~/...
2
votes
0
answers
59
views
PrimeNg 19.x version Packages not loading in imports
@Component({
selector: 'app-root',
imports: [RouterOutlet,FormsModule,MenuBarModule],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
when im typing the ...
3
votes
0
answers
76
views
Can I choose where Visual Studio builds "ISO C++23 Standard Library Modules"?
I have Visual Studio 2022 v17.14.1 compile ISO C++23 Standard Library Modules according to the setting below in several projects:
Unfortunately, each project seems to compile their own copy of the ...
1
vote
1
answer
353
views
How can I use Nuitka to import all script's modules?
I try to turn a .py file into a .bin file with Nuitka.
Since it have to work on machine without python installed, I use the --standalone option that comes with --follow-imports and --python-flag=...
0
votes
0
answers
40
views
How to override forced border and alignment in my HTML code?
I am using Hubspot for my website service and am trying to add an "Add to Cart" feature on my product pages but Hupspot forces their own spacing, and also adds a very large border around the ...
0
votes
0
answers
117
views
How to use C++20 modules across shared library and main executable in Clang with CMake?
Sorry newbie here but this is not obvious for me.
I use linux mint, latest clang version (21.0.0) and switching my project to C++ modules. The problem I experience is that i need to interact in shared ...
0
votes
0
answers
76
views
Centreon plugin fails with 'Can't locate ZMQ/LibZMQ4.pm' despite zeromq installed – conflict with system packages
I'm trying to use the Centreon plugin for VMware (apps::vmware::connector::plugin) on a poller running RHEL 9 / AlmaLinux 9. The plugin fails with the following error:
UNKNOWN: Cannot load module --...
0
votes
1
answer
49
views
Configuring external user-defined module for multiple scripts in python
I am running several python scripts (one at a time) to manipulate photo, video, and audio files in different combinations in the CWD.
Instead of specifying in each script's body the dozens of "...
0
votes
0
answers
112
views
Compiling some C++ code simple module using clang/gcc
I was trying for sake of practice to compile a small module using clang (which is the compiler I have in hand at the moment).
My module code is:
//basic_math.cpp
export module basic.math; //Notice ...
1
vote
1
answer
58
views
Gradle deploy failing in Liferay due don't recognize project import
I’m extending a Liferay 7 portal by adding a new “basic” app under the standard modules/apps directory:
liferay-portal/
└── modules/
└── apps/
└── basic/
├── basic-api/
...
1
vote
1
answer
36
views
Does file_obj.close() nicely close file objects in other modules that have been set equal to file_obj?
I have a file main_file.py that creates a global variable file_obj by opening a text file and imports a module imported_module.py which has functions that write to this file and therefore also has a ...
1
vote
1
answer
101
views
Powershell: permanently import module
Every time I open a new powershell console and import-module a library (e.g AWSPowershell - yes it is old/big but I can’t use the new one without downloading it) it takes some time to fully import the ...