Уведомления

Группа в Telegram: @pythonsu

#1 Июль 22, 2013 23:35:22

mrfoza
Зарегистрирован: 2013-07-22
Сообщения: 2
Репутация: +  0  -
Профиль   Отправить e-mail  

IndentationError: unexpected indent

У меня вот такая проблема
Я уже про Гуглил, и знаю чё это ошибка означает
“проблема в отступах”
Я бы сделал ну я в этом полный “0”
Если не сложно помогите НУБУ

D:\BOOST>ms.py
File “D:\BOOST\ms.py”, line 778
filecs = cfg.get<“FILE”,“FILECS”>
IndentationError: unexpected indent

вот строчки ms.py с 769 до 818

	elif mode == "BOOST" or mode == "boost" or mode == "Boost":
                attempts = 0
                mysqldata = 0
                while attempts < 1:
                        print "Trying connect to mysql and take list of servers from custom BOOST Table..."
                        try:
                                host,name,user,password = cfg.get("BOOST","HOST"),cfg.get("BOOST","NAME"),cfg.get("BOOST","USER"),cfg.get("BOOST","PASSWORD")
                                db = MySQLdb.connect(host=host,user=user,passwd=password,db=name)
                                c = db.cursor()
								filecs = cfg.get("FILE","FILECS")
								filehl = cfg.get("FILE","FILEHL")
								filecss = cfg.get("FILE","FILECSS")
								filehl2 = cfg.get("FILE","FILEHL2")
								fileq368 = cfg.get("FILE","FILEQ368")
                                c.execute("(SELECT address AS unique FROM servers WHERE game = 'cs16' AND type = 1 AND date_end >  unix_timestamp(now()) ORDER BY date_end DESC) UNION (SELECT address AS unique FROM servers WHERE game = 'cs16' AND type = 2 ORDER BY date_create DESC) UNION (SELECT server_ip AS unique FROM mon_servers WHERE server_game = 'cs16')")
                                srvcs_1 = [ics[0] for ics in c.fetchall()]
								srvcs_2 = [ics.strip("\n") for ics in open(filecs)]
								srvcs = srvcs_1 + srvcs_2
                                c.execute("SELECT address FROM servers WHERE game = 'hl'")
                                srvhl_1 = [ihl[0] for ihl in c.fetchall()]
								srvhl_2 = [ihl.strip("\n") for ihl in open(filehl)]
								srvhl = srvhl_1 + srvhl_2
                                c.execute("SELECT address FROM servers WHERE game = 'hl2'")
                                srvhl2_1 = [ihl2[0] for ihl2 in c.fetchall()]
								srvhl2_2 = [ihl2.strip("\n") for ihl2 in open(filehl2)]
								srvhl2 = srvhl2_1 + srvhl2_2
                                c.execute("SELECT address FROM servers WHERE game = 'css'")
                                srvcss_1 = [icss[0] for icss in c.fetchall()]
								srvcss_2 = [icss.strip("\n") for icss in open(filecss)]
								srvcss = srvcss_1 + srvcss_2
                                c.execute("SELECT address FROM servers WHERE game = 'q368'")
                                srvq368_1 = [iq368[0] for iq368 in c.fetchall()]
								srvq368_2 = [iq368.strip("\n") for iq368 in open(fileq368)]
								srvq368_2 = srvq368_1 + srvq368_2
                                c.close()
                                attempts += 1
                                mysqldata = 1
                        except MySQLdb.Error, e:
                                print "Not successfully connected and taked 0 servers. Retry to connect...5 Seconds."
                                print "Error: %s" %e
                                if logerr == "1":
                                        error = str(e)
                                        logerrfile = open('err.log', 'a')
                                        logerrfile.write(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S '))
                                        logerrfile.write(error)
                                        logerrfile.write("\n")
                                        logerrfile.close()
                                time.sleep(5)
                                
                                

Офлайн

#2 Июль 23, 2013 01:59:25

mrfoza
Зарегистрирован: 2013-07-22
Сообщения: 2
Репутация: +  0  -
Профиль   Отправить e-mail  

IndentationError: unexpected indent

Все я решил проблему )

Офлайн

Board footer

Модераторировать

Powered by DjangoBB

Lo-Fi Version