Category "pickle"

python stream file : no idea why this doesnt work ( but i have same stream id every time )

PS : (due to my country's teaching program, I need to write python code like this ) Hello, I have no idea why this doesn't work: from pickle import load,dump

Merge partial pickle files to get back my original pickled model

I have pickled a RF model on my machine and its size is of 360Mb, Now I want to upload it to GitHub but I cannot do it by file upload nor by the terminal, I tri

How do you implement SVoice?

I'm trying to use Facebook's SVoice to split out different speakers in my audio file using python. I found a library that implemented it here: https://github.co

Somehow an error is not being picked up by try... except

I am using a try... except loop to deal with opening a file that is updated throughout the day. Every now and then it would throw an error "pickle data is trunc

UnpicklingError on data received from socket

Context: I have a system with a server.py file and a live_client.py. Server is constantly updating an object. The system works correctly if I send the attribute

Fastest and most efficient way to save and load a large dict

I have a problem. I have a huge dict. I want to save and load this huge dict. But unfortunately I got an MemoryError. The dict should not be too big. What is r

Get only the txt file you want from the folder containing the txt file - Python

I have a folder with a .txt files. the name of the files are: my_file1.txt my_file2.txt my_file3.txt my_file4.txt In this way, only the last number is differen

TypeError: 'module' object is not iterable in django 4

TypeError: 'module' object is not iterable in django 4 I am getting the above error, it has persisted long enough than at this point I really need help. I am u

Operate on .dat file, pickle mod

I have project to do in my studies and it is my first project in Python. I must create simply program for bank. With GUI I'm creating an account on classes and

Python redis-py multiprocessing: TypeError: cannot pickle '_thread.lock' object

I'm trying to parallelize a function in python which interacts with redis using redis-py package. To achieve this task I'm using multiprocessing pool, however I

KeyError: 'initialized_diffuse'

I'm getting a keyerror 'initialized_diffuse' while calling the following API, probably after joblib.load(). import joblib .......... @routes.route("/forecast",

AttributeError: Can't get attribute 'PandasIndexAdapter' on <module 'xarray.core.indexing'

I am trying to unpickle a file but i get this error while running the following code: import pickle import pandas as pd import numpy unpickled_df = pd.read_pick

Convert Pickle Object into JS-readable Code?

I'm pretty new to the Pickle Library and JS. I am writing code in JS to interact with a Python server; when I make a POST to the Python server, I am returned a

A logger embedded in a class loses settings when reading from a pickle

I store my objects with an attribute being a logger in pickle and read them for other programs. I find that the logger's level is lost in the following situatio

Python 3.X Multiprocessing Boost Python Failed

I'm trying to use multiprocessing to map a Boost-wrapped function over multiple cores. This works fine in python 2.7, but is failing in python 3.8. I know the o

PyTorch - RuntimeError: [enforce fail at inline_container.cc:209] . file not found: archive/data.pkl

Problem I'm trying to load a file using PyTorch, but the error states archive/data.pkl does not exist. Code import torch cachefile = 'cacheddata.pth' torch.load

AttributeError: Can't get attribute '_unpickle_block'

While using: with open("data_file.pickle", "rb") as pfile: raw_data = pickle.load(pfile) I get the error: AttributeError: Can't get attribute '_unpickle

How to load pickle files by tensorflow's tf.data API

I have my data in multiple pickle files stored on disk. I want to use tensorflow's tf.data.Dataset to load my data into training pipeline. My code goes: def _p

Fastest way to dump nested dict to the hard drive

I have a big (several Gigs) nested dictionary of this structure: { string1: {string1_1: int1_1, string1_2: int1_2, ...}, string2: {string2_1: int2_1, strin

pickle.PicklingError: args[0] from __newobj__ args has the wrong class with hadoop python

I am trying to I am tring to delete stop words via spark,the code is as follow from nltk.corpus import stopwords from pyspark.context import SparkContext from