1,806
questions
0
votes
2
answers
31
views
Replace Null in Big Query
“How to replace zero values with null in BigQuery for weather data analysis?”
Missing values were incorrectly entered as zeroes, and I need to change them to null values. The code I used was Update (...
0
votes
0
answers
12
views
Getting Value Error while running the model prediction when it is deployed to Google Cloud Run
I'm getting the following error while running the model prediction through my streamlit app deployed on Google Cloud Run. But the same code is running perfectly locally and on Google colab with same ...
0
votes
1
answer
112
views
ValueError: signal only works in main thread of the main interpreter
I am developing an app for realtime object detection that gets opened by voice commands.. There is no error in the program too, but the thing is everytime i run the program flet window says this
...
0
votes
1
answer
31
views
while reading a value by using a for loop it gives me this error (ValueError: invalid literal for int() with base 10: '')
I am trying to make a chess game that can be ran on terminal and a variable that should have a value doesn't have a value and i don't know what is that cousing the problem
I want to make a chess ...
0
votes
0
answers
24
views
ValueError: Unable to create dataset (name already exists) for federated learning
Traceback (most recent call last):
File "/Users/Federated_2Clients/Retrain_2Clients.py", line 178, in <module>
Train_Model = RetrainModel(x0, y0, x1, y1)
File "/Users/...
0
votes
0
answers
15
views
ValueError: The name "model" is used 2 times in the model. All layer names should be unique
I'm trying to take two retrained clients in a federated learning pipeline and average their weights. It worked for the first training, but now the second time I'm getting this error can I have tried ...
0
votes
1
answer
33
views
ValueError: The column label 'NPC' is not unique in Pandas DataFrame
I am working with a Pandas DataFrame that contains optimization results from HOMER software. I am encountering a ValueError indicating that the column label 'NPC' is not unique when I attempt to sort ...
-2
votes
1
answer
59
views
Is there a way to replace a float element in an array with a string element in python? [closed]
I have two arrays in my code. One is a grid that is just filled with zero and the other is an array of characters with positions they need to be placed in on the grid. I included an image with my ...
0
votes
1
answer
38
views
ValueError using Medaka: Expected 96 from C header, got 88 from PyObject
Firstly, I'd like to apologize if I have broken any rules since this is the first time I ask a question in this forum.
So I wanted to add medaka in my Pipeline in order to polish some genome ...
0
votes
1
answer
37
views
Using solve_ivp inside root or fsolve gives ValueError: setting an array element with a sequence
I need to solve a system of equations with a certain parameter p, and then I need to find the value of p that gives me the desired results. My code looks like (in a simplified version)
import numpy as ...
0
votes
1
answer
256
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.
...
1
vote
3
answers
922
views
when model summary() show 'ValueError: Undefined shapes are not supported.'
I facing a problem when defining layers, the model summary for sequential model got error
Images
This problem only show when I run the code on jupyter notebook, when using google colab to run this ...
0
votes
0
answers
104
views
ValueError in Tensorflow that cannot convert to a shape
Trying to fix a tensorflow model from an older version of tensorflow than what I have. I'm getting a ValueError that seems to be from a library version issue, but I'm really not sure how to fix that.
...
0
votes
0
answers
22
views
ValueError: check_hostname requires server_hostname on a proxy enables system
I want to load the BPEmb model on a machine which is accessbile using proxy only.
Initially, I configured the proxy setting, environment and tried. But it couldn't load the model.
Therefore I ...
-1
votes
1
answer
48
views
How I solve "ValueError: Found array with 0 sample(s) (shape=(0, 5)) while a minimum of 1 is required by LinearRegression."
I have built a drought prediction algorithm. The inputs of this model are future year range such as Start year and end year, Month, and City. The output of this model is a bar chart, its Y axis ...
0
votes
1
answer
83
views
ValueError: Invalid classes inferred from unique values of `y`. Expected: [0 1 2], got ['Dropout' 'Enrolled' 'Graduate']
I'm working on a classification task using the XGBoost classifier model. My dataset contains categorical variables, my target classes ('Dropout', 'Enrolled', 'Graduate').
from xgboost import ...
0
votes
1
answer
46
views
reshape numpy matrix where each element is a matrix of different sizes
I have a matrix with 4 elements, where each element is a matrix of different sizes. I am trying to reshape the matrix but it keeps showing me this error: ValueError: could not broadcast input array ...
0
votes
0
answers
19
views
ClassifierChain ValueError: could not convert string to float: 'eval'
I'm attempting to use ClassifierChain on CatBoostClassifier. See the code below.
Xs consist of numerical/categorical features
Y is a 2d boolean matrix.
-------------------------------------------------...
0
votes
0
answers
64
views
How do I fix "ValueError: The model did not return a loss from the inputs"?
I am writing a program in Python. What it does is to train a question-answering model, and it uses a custom-made dataset from a JSON file that I created. However, I ran into the error from the full ...
0
votes
0
answers
26
views
ValueError: operands could not be broadcast together with shapes (0,) (5,4385)
I am working on PSO optimised LSTM for prediction of wind speed. I think i have built the code correctly but i am getting this error in PSO optimisation. The issue seems to be in the fitness function, ...
2
votes
0
answers
46
views
Function to Oversample - Undersample instances in dataset
I want to create a function, that takes data instances, labels, and a target-proportion.
The function should determine the proportion of classes in the given dataset/labels, and resample the data into ...
2
votes
1
answer
39
views
Trying get a table from a website (ValueError: If using all scalar values, you must pass an index)
I'm trying to make a function that automatically takes a table from a website(Wikipedia) cleans it a bit and than displays it, everything worked well with my first 2 tables but the third one is giving ...
-2
votes
2
answers
62
views
why python doesn't calculate the result as per formula I provided
I am working on python, what is wrong with the following code:
try:
x, y = input("fraction: ").split("/")
result = int(f"{x}* 100/{y}%")
if result <= 1:
...
0
votes
0
answers
75
views
Calculating distance between rows of Pandas dataframe and adding to list
The question I'm asking is similar to the one I posted here a while ago: Comparing 2 Pandas dataframes row by row and performing a calculation on each row
I got a very helpful answer to that question ...
0
votes
1
answer
300
views
ValueError: One of the requested xi is out of bounds in dimension 0
I am trying to interpolate a 48 x 86 grid that has wind speed data (the grid being time x height) to a 71 x 81 grid (also time x height). I am trying to use the interpn function from scipy.interpolate ...
0
votes
0
answers
5
views
Training Genomic-ULMFIT model but I am encountering an error
I am trying to train an ULMFiT model found https://github.com/kheyer/Genomic-ULMFiT
I am using custom data and following one of the notebook examples, specifically Mammals LM 3 3m1s. I use the same ...
0
votes
0
answers
45
views
Why is unittest returning ValueError (not in list) when the element is in the list?
I have a function which searches a Bank for a specific Account object. If it finds a matching account, the function replaces the Account object with None. If it finds no match, it returns. This works ...
0
votes
0
answers
27
views
I am facing this error, "ValueError: embedded null character". Here, I was trying to load multiple csv files [duplicate]
I am facing this error, "ValueError: embedded null character". Here, I was trying to load multiple csv files. When I encountered this error.
Here before this I have put paths into a list for ...
0
votes
0
answers
75
views
ValueError: Dimension must be 2 but is 3 (keras Attention)
I'm trying to re-implement the PAtt-Lite implementation (https://github.com/JLREx/PAtt-Lite/blob/main/patt-lite-notebook.ipynb) with the FER-2013 dataset.
My data shapes (48x48 images, rgb):
Shape of ...
0
votes
0
answers
21
views
ValueError in django project [duplicate]
i am creating a student login page and getting the error below, and to my surprise the same code for adminlogin works perfect. I am new to django
ValueError at /studentlogin/
The view myapp.views....
0
votes
0
answers
71
views
Dealing with I/O exceptions beyond OSError
I have an endless program that needs to write to daily log files. Below is basically my Message class that opens a file at startup and closes/opens a new file daily. Now I'm testing for error handling,...
0
votes
0
answers
41
views
Scatter Plot: Value Error, Unable to Coerce to Series
I am currently working on a residual plot visualization for my perceptron. As the title states I am running into an error when calling pyplot.scatter. It seems as though the function wants n_samples ...
1
vote
1
answer
254
views
Jax ValueError: Incompatible shapes for broadcasting: shapes
I'm trying to write a weighted cross-entropy loss to train my model with Jax. However, I think there are some issues with my input dimension. Here are my codes:
import jax.numpy as np
from functools ...
0
votes
0
answers
20
views
Value Error: Data is ambiguous (for some reason, all x values are 1)
So I was coding an AI model that generates music based on text. I checked all the preprocessing functions, and they seem to work just fine. The x samples are the preprocessed text for training, and ...
0
votes
0
answers
14
views
How do I fix the ValueError encountered in my vary_temperature function?
So i am trying to replicate a simple autocomplete model based on the article below
https://jaketae.github.io/study/auto-complete/
When i run my final function, i am running into a value error. It ...
0
votes
1
answer
40
views
ValueError: time data "2020-04-29T17:18:25.574824Z" doesn't match format "%Y-%m-%dT%H:%M:%S%z", at position 3 - I am changing object dtype to datetime
I am trying change object dtype to datetime
# My Code:
import pandas as pd
# Sample data
data = {'Channel_Started': ['2013-05-18T04:46:00Z', '2018-01-16T15:55:22Z', '2016-12-12T05:00:55Z', '2020-04-...
0
votes
0
answers
51
views
for transformers import AutoImageProcessor, AutoModel: ValueError: source code string cannot contain null bytes for transformers import
When trying to use the AutoImageProcessor and the AutoModel from the transformers library as in:
from transformers import AutoImageProcessor, AutoModel
from PIL import Image
import faiss
import numpy ...
0
votes
0
answers
39
views
Layer count mismatch while loading svae deocder part in an Autoencoder model for image
I develop a simple autoencoder model for image.
Once trained, I saved encoder and decoder part in h5 file.
Model training code :
import tensorflow as tf
from tensorflow.keras.layers import Input, ...
0
votes
1
answer
302
views
I keep getting TensorFlow ValueError and I dont know what is causing it
So i installed everything to run a jupyter notebook in Visual studio code and have tensorflow and python fully updated. However, I keep running into an error when I run one of the Kernels. ...
0
votes
1
answer
201
views
What's causing the ValueError: could not interpret identifier: loss?
Within the code below, please help me understand why the loss metric is not being parsed
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.impute ...
0
votes
0
answers
63
views
How to fix "ValueError: Channel is invalid" error when running GPIO code?
I am trying to set up DC motors on a Jetson Nano, using the RPi.GPIO library. However when I try to assign in1 = 35, in2 = 36, and en = 33, it gives me the error:
ValueError: Channel 35 is invalid
I ...
0
votes
0
answers
20
views
Python ValueError in broadcasting although right shapes
I have a problem in a bigger python project.
This ist the code I'm trying to implement. I'm trying to find out in which interval of a0 the points in a lie (there will be a lot more points in the ...
0
votes
1
answer
32
views
I am getting an error. ValueError: time data "1922" doesn't match format "%Y-%m-%d", at position 3
I have been trying to run the below code.
df_tracks.set_index('release_date' ,inplace=True) # inplace mutates the original df
df_tracks.index=pd.to_datetime(df_tracks.index)
df_tracks.head()
But I am ...
0
votes
1
answer
43
views
How reset Django DB? (ValueError: The field <field> was declared with a lazy reference to <app.model>, but app <app> doesn't provide model <model>.)
The Problem
I'm using Django and I was having the error after attempting manual fixes on the migrations folder.:
ValueError: The field API_Materials.ModelParams.material_param was declared with a lazy ...
-1
votes
1
answer
158
views
pd.read_parquet gives ValueError: year 0 is out of range
When trying to load a parquet into a df by typing:
g34i9 = pd.read_parquet('G34I9.snappy.parquet')
I am getting an error as below:
----------------------------------------------------------------------...
0
votes
1
answer
129
views
I'm getting "Couldn't cast because column names don't match" error while I was trying to create a dataset using the datasets package
DataFrame structure
The above image shows the structure of my data.
from sklearn.model_selection import train_test_split
from datasets import Features, ClassLabel, Value, Dataset, DatasetDict
...
0
votes
0
answers
223
views
ValueError: shapes not aligned (when running deep sort on yolov8)
I want to estimate the speed of a vehicle for that I am tracking the vehicle in a video. So I used a variant of deep sort to track and yolov8 for detections.
I tried yolov8 object detection, and deep ...
-1
votes
1
answer
457
views
ValueError: Image size of 2000x100000 pixels is too large. It must be less than 2^16 in each direction [duplicate]
I am trying to plot 5000 images of dataset (pictures of cats and dogs) for an image classification. I am using google colab and even when I tried using pycharm it also shows the same error. I am using ...
1
vote
1
answer
102
views
ValueError: Must produce aggregated value in pandas
I'm getting a ValueError when applying np.sum that I need to product aggregated value. Any word of advise to fix this issue? Btw - This logic used to run for me before.
df1 =
self_id | id | ...
0
votes
0
answers
22
views
How to make VGGNet19 model for FCN: ValueError: Inputs have incompatible shapes. Received shapes (14, 14, 512) and (224, 224, 512)
I want to Architecture of the FCN-VGG19 adapted from Long et al. (2015) which learns to combine high level information with fine, low level information using skips from the third and fourth pooling ...