errno

Cannot connect to mongodb errno:61 Connection refused

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I recently installed mongodb-2.6.0 with Homebrew . After successfully installed, I tried to connect using the mongo command. I am receiving the following errors which do not allow me to connect: Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146 exception: connect failed 回答1: It can happen when the mongodb service is not running on the mac. To start it, I tried brew services start mongodb and it

IOError: [Errno 32] Broken pipe: Python

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a very simple Python 3 script: f1 = open ( 'a.txt' , 'r' ) print ( f1 . readlines ()) f2 = open ( 'b.txt' , 'r' ) print ( f2 . readlines ()) f3 = open ( 'c.txt' , 'r' ) print ( f3 . readlines ()) f4 = open ( 'd.txt' , 'r' ) print ( f4 . readlines ()) f1 . close () f2 . close () f3 . close () f4 . close () But it always says: IOError : [ Errno 32 ] Broken pipe I saw on the internet all the complicated ways to fix this, but I copied this code directly, so I think that there is something wrong with the code and not Python's

MySQL Errno 150

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm creating a few simple tables and I can't get passed this foreign key error and I'm not sure why. Here's the script below. create TABLE Instructors ( ID varchar(10), First_Name varchar(50) NOT NULL, Last_Name varchar(50) NOT NULL, PRIMARY KEY (ID) ); create table Courses ( Course_Code varchar(10), Title varchar(50) NOT NULL, PRIMARY KEY (Course_Code) ); create table Sections ( Index_No int, Course_Code varchar(10), Instructor_ID varchar(10), PRIMARY KEY (Index_No), FOREIGN KEY (Course_Code) REFERENCES Courses(Course_Code) ON DELETE

Python handling socket.error: [Errno 104] Connection reset by peer

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When using Python 2.7 with urllib2 to retrieve data from an API, I get the error [Errno 104] Connection reset by peer . Whats causing the error, and how should the error be handled so that the script does not crash? ticker.py def urlopen(url): response = None request = urllib2.Request(url=url) try: response = urllib2.urlopen(request).read() except urllib2.HTTPError as err: print "HTTPError: {} ({})".format(url, err.code) except urllib2.URLError as err: print "URLError: {} ({})".format(url, err.reason) except httplib.BadStatusLine as err:

IOError: [Errno 22] invalid mode ('wb') or filename:

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I keep getting the following error. IOError: [Errno 22] invalid mode ('wb') or filename: 'C:\\Users\\Viral Patel\\Documents\\GitHub\\3DPhotovoltaics\\Data_Output\\Simulation_Data\\Raw_Data\\Raw_Simulation_Data_2014-03-24 17:21:20.545000.csv' I think it is due to the timestamp at the end of the filename. Any ideas? 回答1: You cannot use : in Windows filenames, see Naming Files, Paths, and Namespaces ; it is one of the reserved characters: The following reserved characters: (less than) > (greater than) : (colon) " (double quote) / (forward slash

Errno::EACCES: Permission denied @ unlink_internal when running rake test:models

匿名 (未验证) 提交于 2019-12-03 02:00:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm playing with rails 4. I just created very simple test for my model but when I try to execute "rake test:models" I get following error: C:\rails\project>rake test:models DL is deprecated, please use Fiddle rake aborted! Errno::EACCES: Permission denied @ unlink_internal - /tmp/db/new.sqlite3 C:/rails/project/test/test_helper.rb:3:in ` ' C:/rails/project/test/models/admin_test.rb:1:in ` ' Tasks: TOP => test:models (See full trace by running task with --trace) My test database configuration looks as follows: test: adapter: sqlite3 database:

FileNotFoundError: [Errno 2] No such file or directory

匿名 (未验证) 提交于 2019-12-03 02:00:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to open a CSV file but for some reason python cannot locate it. Here is my code (it's just a simple code but I cannot solve the problem): import csv with open('address.csv','r') as f: reader = csv.reader(f) for row in reader: print row 回答1: You are using a relative path, which means that the program looks for the file in the working directory. The error is telling you that there is no file of that name in the working directory. Try using the exact, or absolute, path. 回答2: When you open a file with the name address.csv , you are

error: [Errno 32] Broken pipe

匿名 (未验证) 提交于 2019-12-03 01:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am working on a Django project. All went well till I created an Ajax request to send values from the html page to the backend (views.py). When I send the data using Ajax, I am able to view the values being passed to views.py, and it even reaches the render_to_response method and displays my page, but throws the broken pipe error in the terminal. I don't see any kind of disruption to the program, but I wanted to know if there is a way to prevent this error from occurring. I checked the other responses. But no luck so far. When I try to hit

PermissionError: [Errno 13] in python

匿名 (未验证) 提交于 2019-12-03 01:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Just starting to learn some python and I'm having an issue as stated below: a_file = open('E:\Python Win7-64-AMD 3.3\Test', encoding='utf-8') Traceback (most recent call last): File " ", line 1, in a_file = open('E:\Python Win7-64-AMD 3.3\Test', encoding='utf-8') PermissionError: [Errno 13] Permission denied: 'E:\\Python Win7-64-AMD 3.3\\Test\ Seems to be a file permission error, if any one can shine some light it would be greatly appreciated. NOTE: not sure how Python and Windows files work but I'm logged in to Windows as Admin and the

Catch “socket.error: [Errno 111] Connection refused” exception

匿名 (未验证) 提交于 2019-12-03 01:55:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: How could I catch socket.error: [Errno 111] Connection refused exception ? try : senderSocket . send ( "Hello" ) except ?????: print "catch !" 回答1: By catching all socket.error exceptions, and re-raising it if the errno attribute is not equal to 111. Or, better yet, use the errno.ECONNREFUSED constant instead: import errno from socket import error as socket_error try : senderSocket . send ( 'Hello' ) except socket_error as serr : if serr . errno != errno . ECONNREFUSED : # Not the error we are looking for, re-raise raise serr #