Questions tagged [eoferror]

1

votes
0

answer
20

Views

Python EOFerror, binarygap

def dectobin(n): return int(bin(n)[2:]) print(int(bin(n)[2:])) def solution(r): k = dectobin(r) print(k) m = str(k) maxgap=0 running=0 for i in (0,len(m)-1): if m[i] == 0: running = running+1 elif m[i] == 1: if running > maxgap: maxgap = running running = 0 print(maxgap) x = input('give the number')...
sudheer naidu
1

votes
0

answer
154

Views

Pyspark, EOFError - Memory issue or broken data?

I have a dataframe, which has about 2 million rows with URLs, 2 columns: id and url. I need to parse the domain from the url. I used lambda with urlparse or simple split. But I keep getting EOFError with both ways. If I create a random 'sample' of 400 000, it works. What is also interesting, is that...
fukacka
1

votes
1

answer
42

Views

EOFError, even after trying the try and except block

Could anyone please state the reason why it is showing. I acknowledge it as python after reading the input states that there is nothing to read. Python 3.6 #!/bin/python3 import math import os import random import re import sys while True: try: N = int(input()) except EOFError: return #N = int(input...
Vaitesh Selvaraj
1

votes
1

answer
393

Views

Fresh gitorious install – push fails with EOFError

I'm deploying Gitorious on an Ubuntu 11.04 machine. Everything works, except pushing. The client gets this: $ git push origin master == Gitorious: ========================================================== fatal error ======================================================================== fa...
Ruben Verborgh
1

votes
2

answer
548

Views

Ruby: End of file reached with gem serialport

Using gem serialport in ruby i'm having the error code EOFError: end of file reached irb 2.0.0-p451 :001 > require 'serialport' => true 2.0.0-p451 :002 > serial_port = SerialPort.new '/dev/ttyUSB0', 115200 => # 2.0.0-p451 :009 > serial_port.write '@00RD0000020054*\r' => 17 2.0.0-p451 :010 > r = s...
Simone Melloni
1

votes
1

answer
301

Views

Web application could not be started with rails

I'm trying to deploy a second rails app to a linux server but I'm getting a 'Web application could not be started'. Not sure where to look to even begin solving this. Using Appache/passenger. Virtual host setup is similar to other site that is running on server. I do have a different IP address s...
user2167302
1

votes
2

answer
0

Views

Python Script Won't Run Via TextMate, OK in IDLE and Eclipse

I wrote the following for a homework assignment and it works fine in IDLE and Eclipse running Python 3. However, I tried to run it from TextMate with the new line 1 -- which I found here -- to point it to Python 3 on the Mac. It seems to be running Python 3 but returns an error. It says: EOFError:...
Farrell
1

votes
1

answer
0

Views

using cPickle returns only the first entry in the file

I am storing a dictionary object into file using cPickle, and not able to get any other entry other than the first one. Initially the file tweets.pkl is empty, and the EOFError is raised. I am sure it has something to do with it. Thanks #!/usr/bin/env python...
ajmartin
1

votes
2

answer
0

Views

ActiveResource EOFError on “slow” API

I'm seriously struggling to solve this one, any help would be appreciated! I have two Rails apps, let's call them Client and Service, all very simple, normal REST interface - here's the basic scenario: Client makes a POST /resources.json request to the Service The Service runs a process which create...
BSM
1

votes
1

answer
754

Views

Python 3: End of File error with no message

I'm having some trouble figure out how to create an EOFError without printing something after it. This is the section of the program I'm having trouble with: def main(): try: k = float(input('Number? ')) newton(k) print('The approximate square root of', k,'is:',newton(k)) print('The error is:',(new...
user1810908
1

votes
0

answer
23

Views

Python EOFError for 2nd raw_input in Script only on WSL

I have a basic script that I am running in a WSL Terminal (Ubuntu 18.04) that gets 2 inputs from a user to create an email, essentially it get the message and then the server to use. It prompts for the message first and allows the user to enter the input, this works fine. After that it then does a r...
spaceandtime
1

votes
1

answer
442

Views

EOFError while using raw_input in Pycharm

EDIT: Also refer to this - PyCharm: How to debug `raw_input()` input from keyboard? I'm writing a code with for loop and taking raw_input for turn in range(4): guess_row[0] = int(raw_input('Player 1 Guess Row:')) guess_col[0] = int(raw_input('Player 1 Guess Col:')) guess_row[1] = int(raw_input('Play...
Jugal Anchalia
0

votes
0

answer
19

Views

Why is there an EOF error when I try multiprocessing?

In my text game, I was using threads for a real-time battle system. It worked, but it asked you for a load of inputs at the end if you were too slow at answering. I tried to learn multiprocessing so I could terminate the threads and get rid of the extraneous inputs, but this made things worse. Now I...
0

votes
1

answer
21

Views

EOFError in converting string to list

I have a code which is running on 2 hosts. They are processing some photos. When host1 receives a message, it will send some of its photos to host2 for processing. It will also send a list to host2 (it will convert it to string and then it will send it). import pickle import time, threading host = c...
helen
1

votes
1

answer
640

Views

User input with Sublime Text 2

Is it possible to test accepting user input with Sublime Text 2? For instance, this: x = input() print(x) Spits out an EOFError. How can I have it accept user input? Or open a console window to accept user input?
user1560585
1

votes
1

answer
563

Views

EOFError when using raw_input

I am learning python via codeacademy's python syntax tutorial but when I run the same working code in SublimeText2 the code does not build properly. I have version 2.7 of Python installed on my mac for the record. original = raw_input('Enter a word:') print original I am wondering why this code woul...
Bodhidarma
2

votes
2

answer
31

Views

EOFError when starting with subproccess

When i start my python3 script with subproccess from an other script i get the following error: Select the keyword preset you want to use:Traceback (most recent call last): File 'test2.py', line 9, in keywordselect=input('Select the keyword preset you want to use:') EOFError But when i start the sc...
Thiplol
2

votes
2

answer
1.8k

Views

EOFerror in unpickling Python dictionary from an empty pickle file

Very newbie programmer, sorry if this is stupid or if my English is wrong. So, I have this command line address book that I am writing. It consists of a dictionary that holds an object with the key as the name variable, and each object has variables associated with it like the name of the person, th...
chilliefiber
2

votes
1

answer
1.2k

Views

python pickle.load() pkl file throws EOFError

a friend generates a pickle file for me. As he works on python 3 while I work on python 2, so he generated the file with pickle.dump(some_file_to_be_pickled,open('path_to_that_file','wb+'),protocol=2) While I tried to load it with the_file = pickle.load(open('path_to_that_file','rb')) However, I m...
gladys0313
2

votes
3

answer
4.3k

Views

EOF Error in python Hackerrank

Trying to solve a problem but the compiler of Hackerrank keeps on throwing error EOFError while parsing: dont know where is m i wrong. #!usr/bin/python b=[] b=raw_input().split() c=[] d=[] a=raw_input() c=a.split() f=b[1] l=int(b[1]) if(len(c)==int(b[0])): for i in range(l,len(c)): d.appen...
imshashi17
1

votes
1

answer
7k

Views

Python EOF error raw_input()

I'm using Zed Shaw's Learn Python the Hard Way. In exercise 11, the code produces an EOF error on line 2. Here is the code: 1 print 'How old are you?', 2 age = raw_input() 3 print 'How tall are you?', 4 height = raw_input() 5 print 'How much do you weigh?', 6 weight = raw_input() 7 print 'So,...
koopertrooper
2

votes
1

answer
4.6k

Views

Getting EOFError along with exceptions when using ftplib

I'm looking into using ftplib (and possibly ftputil) for doing some automated FTP file syncing. I have a couple of servers to test this against at the moment, but, whilst I'm having a successful conversation with both servers, I get EOFError-s with each error reply. For example: if I try to log in w...
bdeniker
11

votes
1

answer
7.5k

Views

python 2.6 cPickle.load results in EOFError

I use cPickle to pickle a list of integers, using HIGHEST_PROTOCOL, cPickle.dump(l, f, HIGHEST_PROTOCOL) When I try to unpickle this using the following code, I get an EOFError. I tried 'seeking' to offset 0 before unpickling, but the error persists. l = cPickle.load(f) Any ideas?
fsm
5

votes
4

answer
38.5k

Views

EOFError in Python script

I have the following code fragment: def database(self): databasename='' host='' user='' password='' try: self.fp=file('detailing.dat','rb') except IOError: self.fp=file('detailing.dat','wb') pickle.dump([databasename,host,user,password],self.fp,-1) self.fp.close() selffp=file('detailing.dat','rb')...
user46646
3

votes
1

answer
88

Views

EOFError when input() after print() in SSH console

I got a strange behavior in my Python code. It runs fine in my Windows console For example, @cmd.exe : python file.py Content of my file.py file print('-------------------------- RANDOM STRING HERE! --------------------------------') email = input() print('-------------------------- RANDOM STRING HE...
Yidir
3

votes
1

answer
1.5k

Views

python 3.2 pickle.load results in EOFError randomly

I encounter a very strange error. I have a cronjob that run daily: it opens a pickled file, load that file and then process the data. At the end of the script, it will save the data to that file for next day processing. Most of the time, this script runs fine but there's some time (I would say twice...
doluong
3

votes
2

answer
12.6k

Views

Python Pickling Dictionary EOFError

I have several script running on a server which pickle and unpickle various dictionaries. They all use the same basic code for pickling as shown below: SellerDict=open('/home/hostadl/SellerDictkm','rb') SellerDictionarykm=pickle.load(SellerDict) SellerDict.close() SellerDict=open('/home/hostadl/Sel...
jordanskis
6

votes
1

answer
5k

Views

raw_input causing EOFError after creating exe with py2exe

After creating an exe from a script with py2exe raw_input() is causing an EOFError. How can I avoid this? File 'test.py', line 143, in main raw_input('\nPress ENTER to continue ') EOFError: EOF when reading a line
volting
1

votes
1

answer
3.7k

Views

EOF Error on pickling in python

Here is the code that is causing this error. sending thread: data = pickle.dumps (object); receiving thread: self.object = pickle.loads(data) // Erroneous line The error displayed is self.object = pickle.loads(data) EOFError Also to add to details, this error occurs only 50% of the times. The othe...
appy g
2

votes
1

answer
493

Views

EOFError in python win32com

I am running Sympathy for Data, a program based on python. It worked well until today. I got error message like this: File '..\Python27\lib\site-packages\win32com\client\__init__.py', line 11, in import gencache File >'..\Python27\lib\site-packages\win32com\client\gencache.py', line 662, in _ _ini...
NAX
4

votes
1

answer
7k

Views

How to Handle EOFError for raw_input() in python in Mac OS X

My python program has two calls to raw_input() The first raw_input() is to take multiline input from the user. The user can issue Ctrl+D (Ctrl+Z in windows) for the end of input. Second raw_input() should take another input from user with (y/n) type prompt. Unfortunately (in Mac OS X only?), second...
abhiomkar
2

votes
1

answer
302

Views

Google foobar Challenge EOFError

I am trying to complete my first challenge on Google foobar challenges and I am stuck with an error which I can't seem to fix no matter what I do! def answer(plaintext): plaintext = raw_input('(string) plaintext = ') answer(plaintext) I get EOFError [line 2]. But, when I do this: def answer(plaintex...
Rajendra Kodumuri
3

votes
1

answer
3.5k

Views

MultiProcessing Pipe recv blocks even when child process is defunct

Reading several questions on this topic I understand now that the child process inherits the file descriptors from the parent process. Which will make it more difficult for a child to receive an EOFError when a parent closes the connection. But my situation is the other way around, and I do not unde...
Vincent Ketelaars
3

votes
1

answer
399

Views

EOFError randomly appeared while using PYTTSX and my code now constantly throws this error? It worked fine hours before

I was using PYTTSX yesterday with no issues at all - it was acting exactly as expected and working fine. However, when I tried to run the exact same code not two hours later it threw this error: Traceback (most recent call last): File 'C:\Python27\FUCK.py', line 2, in engine = pyttsx.init() File 'C...
Ryan Werner
2

votes
0

answer
422

Views

Python SSH Paramiko EOFError

I have just simple script like that to connect via SSH on Nokia router and execute command 'show time': import paramiko ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect('adres ip', port=22, username='username', password='password') ssh_stdin, ssh_stdou...
Paweł Kudalski
3

votes
1

answer
3.3k

Views

Python EOF error when trying to run code

I'm trying to run python code with the atom-runner for atom, but it returns and EOF error. I did what other answers to similar questions said to do, and put raw_input() instead of input(), but it still returns and EOF error. Here is my code: tempf = int(raw_input('What is the temperature in fahrenh...
HungryHobo
2

votes
1

answer
638

Views

py2exe gives EOFError

I have a simple program, I used pygame to import sound but it is still a CLI program. Whenever I compile it into an exe it gives me an EOFError when I try to run it, It looks like this Traceback (most recent call last): File 'PlanetaryDistanceFromSun.pyw', line 57, in File 'PlanetaryDistanceFr...
WillumMaguire
4

votes
1

answer
2.5k

Views

Pickle: Reading a dictionary, EOFError

I recently found out about pickle, which is amazing. But it errors on me when used for my actual script, testing it with a one item dictionary it worked fine. My real script is thousands of lines of code storing various objects within maya into it. I do not know if it has anything to do with the siz...
Jared
1

votes
3

answer
7.1k

Views

Python EOF Error in raw_input()

I am trying to get input from the user at the command prompt. The program reads in data from a text file in the manner of 'cat text.txt | ./thescript.py' At the point of the script in question, all data has already been read in, processed, and put into a list of lists. Now I am iterating through...
Wyatt
2

votes
1

answer
4k

Views

EOFError whilst pickling in Python

Here's the problem - I'm trying to pickle, and then unpickle hiscores. When I use pickle.load, Python seems to think that I'm trying to load a file called 'Pickle' that I have. Here's the code: def recieve_hiscores(): hiscores_file = open('hiscores_file.dat', 'rb') for i in hiscores_file: hiscores =...
Matt

View additional questions