Actually, the problem just got worse. I forgot that I have json files with 750 files in it that needs to be imported. It is very important that I be able to import these files because they speed up the program enormously.
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Latest posts made by bobsmith76
-
RE: Import several files at once
-
Import several files at once
Is there anyway to import several files at once. My program is split into 35 files and I have to import them one at a time. It is extremely tedious.
Also, I'm trying to open up a pickle that is 8 megs large. It takes a lot of time and it crashes before it opens. Is this normal? Of course, I can chop it up into 8 sections and put it back together, but I would rather not do that.
-
RE: can pythonista use pickles?
it automatically adds the .py extension to all files. so z_dict_words.pkl becomes z_dict_words.pkl.py. how do i rename files?
-
RE: can pythonista use pickles?
If I import a zipped pkl do I have to unzip it? If so how?
-
RE: can pythonista use pickles?
I was not able to rename the file but I created a new file and cut and paste the text of z_dict_words.py into the newly created z_dict_words.pkl. I then ran the code and pythonista was not able to load the pickle file. This is the error message I got:
File "/private/var/mobile/Containers/Shared/AppGroup/D4D2C25F-316F-47DF-8CFF-84E670A3283D/Pythonista3/Documents/main_loop.py", line 163, in get_result
dictionary = pickle.load(pkl_file)
_pickle.UnpicklingError: invalid load key, '\xc2'.These lines are 150 - 163 in my code:
def get_result(one_sent, user = "", print_type="40", order=[0], get_words_used=0): global words_used total_time = time.time() if one_sent == 'a': proof_type, print_type, get_words_used, order = parameters() pkl_file = open(user + 'zz_claims.pkl', 'rb') test_sent = pickle.load(pkl_file) pkl_file.close() elif one_sent != "": test_sent = one_sent else: pkl_file = open(user + 'zz_claims.pkl', 'rb') test_sent = pickle.load(pkl_file) pkl_file.close() pkl_file = open(user + 'z_dict_words.pkl', 'rb') dictionary = pickle.load(pkl_file) pkl_file.close()
I'm attaching a screenshot so as to demonstrate that the file is in my script library
-
RE: can pythonista use pickles?
i'm trying to download some kind of file manager app ut not having much success because i have an ipod 6 touch which is very old.
-
RE: can pythonista use pickles?
hold on, I didn't see that part about using the files app on the ipod.
-
RE: can pythonista use pickles?
here, I took some screenshots available here
https://drive.google.com/drive/folders/1djAgW_weu-eGZFB-ZKV_6ZOQzu6bxXrB?usp=sharing
when I click on the file to share on my desktop with is lemmata.pkl nothing relating to pythonista3 shows up.