Questions tagged [init]
May refer to Linux init, an abbreviation of initialization - giving variables a "starting" value, or Python's __init__ class initiation method.
init
1,928
questions
0
votes
0
answers
10
views
unable to use snap to install netbeans on mx-linux
I'm trying to install netbeans following the official step-by-step but when i try sudo snap install snapd I get
error: cannot communicate with server:
Post "http://localhost/v2/snaps/snapd":...
-1
votes
0
answers
20
views
How can I correct or get rid of this syntax error? [closed]
I am new to coding and messed up somewhere using my Mac terminal window to install Ruby. I am getting this message on start up when the terminal window opens:
Last login: Fri Jul 19 19:49:59 on ...
0
votes
0
answers
12
views
Pylucene 8.11.0 installation on Ubuntu
I want to install pylucene 8.11.0 on ubuntu 64
I did python build and install
please help me to solve it
and when I want to make file I have this error
sudo make install
/usr/bin/python3 /usr/lib/...
-2
votes
1
answer
69
views
How to hide the __init__.py in every directory [duplicate]
I have a repo filled with lots of nested directories; in almost everyone, I have a __init__.py file. The problem is it makes it harder to visually search directories for the files, and it was ...
0
votes
1
answer
29
views
How to send ViewModel event on activity start in the ViewModel init function correctly?
I want a camera screen to open after the activity has been created. When I send an event triggering the camera in the ViewModel init function then nothing happens:
The ViewModel init function:
init{
...
2
votes
1
answer
80
views
Need to provide addition steps to pydantic model initialisation method
I am trying to add custom steps to the Pydantic model __init__ method.
Pseudo Sample Code :
class Model(BaseModel):
a: int
b: Optional[List[int]] = None
c: Optional[int] = None
def ...
0
votes
1
answer
41
views
Subclass super().__init__(*args, **kwargs) not working. Says object.__init__() takes exactly one argument (the instance to initialize) when it doesn't
I am working on making a subclass of the rustworkx.PyGraph class, and I am getting some strange behavior. Namely, it does not allow me to pass keyword arguments to my class.
Here is a minimal example:
...
1
vote
1
answer
38
views
ModuleNotFoundError when importing a class from another python file
I encountered a ModuleNotFoundError: No module named 'dir1' error when I tried to run code1.py where I import a class 'car' from the module1.py file. This is the directory:
PYFILES
|- dir1
|- ...
-1
votes
1
answer
27
views
Agora IOT SDK fails to Initialize
I followed agora IOT SDK for android. but the SDK fails to initialize with error -20. what does this error code mean? and i wanna know whether this IOT SDK still supports for older android verison ...
0
votes
1
answer
19
views
varibles in __init__() get overlap? [duplicate]
I am using __init__() to storing 2 varibles called self.a, self.b. I want to use these var for tracking changes that may happen. However if i using list instead of int it seem that self.b are now self....
-1
votes
1
answer
43
views
Subclasses init method
I have a question regarding the init method for subclasses in Python.
In the image above, a child class Developer is being defined from a parent class Employee. In Developer, the __init__ method is ...
0
votes
0
answers
45
views
ModuleNotFoundError: No module named - Python packages
I'm trying to get a handle on using modules and packages in Python when dealing with different directories. Here’s what my project structure looks like, with empty init files:
├── Dockerfile
├── app
│ ...
1
vote
1
answer
59
views
Why my I can't initialize my code in Terraform when I using command "Terraform init"?
I have this problem, every time I type "terraform init" I get this error:
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for ...
1
vote
1
answer
57
views
Why does python allow there to be no __new__ method?
Why does python allow there to be no __new__ method in a class, whereas __init__ is mandatory?
For example, if you want to create an instance of 'Class A', you simple call A() and an object is created....
2
votes
1
answer
37
views
Run a function just after init() completes in Swift
I am testing to run delegation pattern from initializers. Here is my data supplier test class and its' data source :
protocol MyClassDataSource : AnyObject{
func returnString(string: String)
}
...