Questions tagged [typeerror]
A TypeError is a specific type of error raised when an operation or function is applied to an object of inappropriate type. You might encounter it in Python or JavaScript.
typeerror
7,794
questions
0
votes
0
answers
25
views
Getting a TypeError: Cannot read properties of undefined (reading 'on')
const Editor = ({ socketRef, roomId, onCodeChange }) => {
const editorRef = useRef(null);
useEffect(() => {
async function init() {
editorRef.current = Codemirror....
-1
votes
0
answers
20
views
I'm getting type error in python while calculating factorial using recursive Function [duplicate]
def calc_fact(n):
if (n == 1 or n == 0):
return 1
else:
n * calc_fact(n-1)
print(calc_fact(5))
Was trying to create function to calculate factorial facing type error operand not ...
0
votes
1
answer
38
views
TensorFlow - ValueError: Argument `output` must have rank (ndim) `target.ndim - 1`
I'm trying to train a sequential model on the TinyImageNet dataset, using TensorFlow.
TinyImageNet has 200 classes, 100k rows for training and 10k for validating. It has two columns, image and label.
...
-2
votes
0
answers
29
views
Kaggle giving me Type Errors for no reason [closed]
Kaggle keeps giving me a TypeError: 'NoneType' object is not iterable for the below code:
dls = DataBlock(
blocks=(ImageBlock, CategoryBlock),
get_items=get_image_files,
splitter=...
0
votes
0
answers
33
views
NextJs app throws UND_ERR_CONNECT_TIMEOUT in Container
Couple of hours ago Nextjs app in Docker container stopped funtioning normally.
I looked at container's logs using docker logs and noticed the error below:
⨯ TypeError: fetch failed
at node:...
0
votes
0
answers
66
views
TypeError: Cannot read properties of undefined (reading 'None')
I'm building this simple Kanban board using Angular's drag and drop CDK Earlier today it was working fine, but now all I'm getting a blank screen, the console shows:
TypeError: Cannot read properties ...
1
vote
1
answer
34
views
Python Selenium TypeError: Missing 1 required positional argument: 'self'
I keep getting this error when try to run my code. I'm new to Python Selenium and I just can't get my head around this error:
TypeError: practicepagebutton() missing 1 required positional argument: '...
0
votes
0
answers
27
views
Error initializing FFmpegKit: "TypeError: Cannot read property 'getLogLevel' of null" in React Native
I'm developing a React Native application where I need to process videos using the ffmpeg-kit-react-native library. However, I'm encountering an issue during the initialization of FFmpegKitConfig. The ...
1
vote
1
answer
29
views
I am getting a typeError in javascript : formhandler is not a cosntructor
i am trying to learn frontend development from a book called Front-end Web Development : Big Nerd Ranch Guide , I am copy/pasting code book into my computer but today i got a error that one of my ...
0
votes
1
answer
29
views
How to create extended dict Class requiring key/values on get()
I'm trying to build a custom class that will require keys and/or values when getting them from a dict. This is a simple version of what I have written, getRequired and is only checking for keys.
class ...
0
votes
1
answer
43
views
MLflow: ModelSignature.from_dict() throws TypeError: string indices must be integers
I'm trying to create a ModelSignature in MLflow using the ModelSignature.from_dict() function. This is my code:
from mlflow.models import ModelSignature
signature_dict = {
"inputs": '{&...
-1
votes
0
answers
68
views
Why I am getting this error: TypeError: Expected a Runnable, callable or dict.Instead got an unsupported type: <class 'NoneType'>
import streamlit as st
from langchain_google_vertexai import VertexAI
from langchain_core.prompts import PromptTemplate
import os
import sys
sys.path.append(os.path.abspath(''))
class QuizGenerator:
...
0
votes
2
answers
47
views
_TypeError (type 'Future<dynamic>' is not a subtype of type 'Movie')
I am trying to create a class to display a movie title and poster in a card. I am using the TMDB API. here are my dart files-
movie.dart
class Movie{
String mtitle;
String mposter;
Movie({...
1
vote
1
answer
29
views
Type assignment error in implementing Dart's ZoneSpecification
I'm getting a static analysis error while implementing Dart's Zone.
Code:
void main() {
Zone.current.fork(specification: ZoneSpecification(scheduleMicrotask: (self, parent, zone, f) => parent....
0
votes
0
answers
23
views
TypeError getting null for nodeName in in-built (?) function
I'm trying to implement a "bold" button on my React/JS code. It works fine when I "bold" selected text, but "unbolding" previously bolded text leads to this error:
Error ...