connect

Python AttributeError: 'str' object has no attribute 'cursor'

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Today is my 3rd day learning Python and despite numerous web searches I can't seem to get past this issue. The code takes in input on the command line and passes it to the connection script fine and it connects. The problem comes when I try to connect the cursor to the connection object on the line that reads: cor = con.cursor() . I get the error message: AttributeError: 'str' object has no attribute 'cursor' . Basically all I'm trying to do is take in parameters for my connection string to connect to the database and then be able to run my

Cannot connect to X server :0.0 with a Qt application

匿名 (未验证) 提交于 2019-12-03 01:32:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Compiling on Fedora 10. I have just started my first qt GUI application. I used all the default settings. Its just a simple form. It builds OK without any errors. But when I try and run the application. I get the following message: Starting /home/rob/projects/qt/test1/test1/test1... No protocol specified test1: cannot connect to X server :0.0 Thanks for any advice, 回答1: The general causes for this are as follows: DISPLAY not set in the environment. Solution : export DISPLAY=:0.0 ./myQtCmdHere ( This one doesn't appear to be the one at fault

Unable to connect to SQL Express \"Error: 26-Error Locating Server/Instance Specified)

匿名 (未验证) 提交于 2019-12-03 01:32:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am at an loose end with one particular box that is running SQL Server 2008 R2 Express. Windows Firewall is configured to allow inbound TCP & UDP 1433, 1434. Windows Firewall is configured to allow outbound TCP & UDP on any port. No other software AV/FW is currently running. When I try to connect to xxx.xxx.xxx.xxx\sqlexpress , it times out with the following error: TITLE: Connect to Server Cannot connect to xxx.xxx.xxx.xxx\SQLEXPRESS. ADDITIONAL INFORMATION: A network-related or instance-specific error occurred while establishing

Can't connect IntelliJ-IDEA to GitLab with SSH

匿名 (未验证) 提交于 2019-12-03 01:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to connect my GitLab repository with IntelliJ-IDEA, and it still cant connect to the repo. I have tried the next things: I have msysgit installed correctly Generated the SSH keys ( https://help.github.com/articles/generating-ssh-keys/ ) Added the key on GitLab keys Define the enviroment variables HOME USERPROFILE point to C:\Users\sebastian.garces.ssh. %USERPROFILE$/.ssh %HOME$/.ssh In IntelliJ changed SSH executable to Native I did a lot of things from this links: How do I connect IntelliJ to GitHub using SSH How to store SSH

Python socket connection exception

匿名 (未验证) 提交于 2019-12-03 01:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a socket-connection going on and I wanna improve the exception handling and Im stuck. Whenever I use the socket.connect(server_address) function with an invalid argument the program stops, but doesnt seem to throw any exceptions. Heres my code import socket import sys import struct class ARToolkit(): def __init__(self): self.x = 0 self.y = 0 self.z = 0 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.logging = False def connect(self,server_address): try: self.sock.connect(server_address) except socket.error, msg:

Cannot connect to postgres from remote host

匿名 (未验证) 提交于 2019-12-03 01:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a database server (192.168.1.50) running postgres. I have created a database named "testdb" and a user "testuser" with password "testuserpw". Locally, I can connect to the db using: psql - d testdb - U testuser When I issue the command from another host (192.168.1.60): psql - h 192.168 . 1.50 - d testdb - U testuser I have the error: psql : could not connect to server : Connection refused Is the server running on host "192.168.1.50" and accepting TCP / IP connections on port 5432 ? Any idea ? 回答1: Check the setting of listen

How to connect an Oracle database from PHP

匿名 (未验证) 提交于 2019-12-03 01:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How do I connect to an Oracle database from PHP? 回答1: Forth link in google after searching for your exact questions brought up the following link: http://me2learn.wordpress.com/2008/10/18/connect-php-with-oracle-database/ 回答2: I assumed you want to connect php with oracle databases. so, I give you two of file, this is represent a basic php-oracle for your reference. good luck! form.php User Name Password login.php Step 2. Download the "InstantClient Package - Basic" for Windows from the [OTN InstantClient page][1]. Make sure you download the

Connecting to multiple servers from a single client socket C

匿名 (未验证) 提交于 2019-12-03 01:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a single client that is trying to connect to my main server using socket s1. The client needs to keep trying to connect to main server with s1, but at the same time connect and keep sending "trying" messages to my secondary server. Is it a good idea to create 2 sockets,reuse port and create 2 binds for those 2 sockets or there are better ways to achieve this? This is a client side and using C sockets. Thanks. 回答1: If your program is a client to multiple servers, use one socket per server. You don't need bind for a client socket at all

npm ERR! Error: connect ECONNREFUSED

匿名 (未验证) 提交于 2019-12-03 01:27:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to update the npm (node package manager) using the command: npm install npm@latest -g but I', getting the following error in the command prompt: does someone know what this really means? npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ node_modules\\npm\\bin\\npm-cli.js" "install" "npm@latest" "-g" npm ERR! node v6.9.5 npm ERR! npm v3.10.10 npm ERR! code ECONNREFUSED npm ERR! errno ECONNREFUSED npm ERR! syscall connect npm ERR! Error: connect ECONNREFUSED xxx.xxx.xx.xxx

zabbix server cannot connect to database

匿名 (未验证) 提交于 2019-12-03 01:26:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: First, zabbix web gui can work, but zabbix server stutus is 'Not running' It means mysql works correctly, because zabbix web can connect it. Next, I checked zabbix server /var/log/zabbix/zabbix_server.log, here is the details: 14329:20160913:145134.438 database is down: reconnecting in 10 seconds 14329:20160913:145144.439 [Z3001] connection to database 'zabbix' failed: [0] could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 3306? received invalid response to