Neith 0 Posted September 24, 2014 Share Posted September 24, 2014 Hey guys, just registered for the Reborn league thing and when i went to make my trainer card, all I got was this: .#!/usr/bin/env python import cgi import os import re import subprocess import sys import threading import Queue import MySQLdb ############################# [CONFIG] ############################### PATH = "/home/amethyst/public_html/tc/" ALPHA = "#DA0205" HOST = "http://pokemonreborn.com" THREADS = 10 DEBUG = False # Script shows more verbose output, but will break user-side functionality VISIBLE_BLANKS = 3 # Number of blank badge squares to display beyond the last badge. (without fight-up) ############################# [/CONFIG] ############################## JOIN = lambda x: os.path.join(PATH, x) BADGES = JOIN("badges.png") DB = MySQLdb.connect(user="amethyst_sprites", passwd="luna0-", host="localhost", db="amethyst_sprites").cursor(MySQLdb.cursors.DictCursor) DB.execute("SELECT * FROM 2leaders ORDER BY id ASC") RANKS = [leader["rank"] for leader in DB.fetchall()] Q = Queue.Queue() def debug(string=""): header(string) if DEBUG else header() def header(string=""): print "Content-type: text/html\n\n" + str(string) sys.exit() def run(command): call = subprocess.Popen(re.split(r"(? " % (HOST, res["id"])) # debug(err) except Exception as e: debug(str(res["id"]) + ": " + str(e.args) + " ... " + str(sys.exc_info()) + " ") def main(): form = cgi.FieldStorage() if "id" in form: try: id = int(form.getvalue("id")) except ValueError: header("Invalid trainer ID") DB.execute("SELECT * FROM members WHERE id=%s", (id,)) res = DB.fetchone() if not res: debug("Invalid member ID ... try %s/tc.py?id=1" % (HOST, HOST)) try: create(res) header(Q.get()) except Exception as e: debug(str(e.args)) else: output = "" DB.execute("SELECT * FROM members ORDER BY id ASC") threads = [threading.Thread(target=create, args=(member,)) for member in DB.fetchall()] for thread in threads: thread.start() while threading.activeCount() > THREADS: pass for thread in threads: thread.join() if not Q.empty(): output += Q.get() header(output) if __name__ == "__main__": main() Ideas? Link to post Share on other sites
Etesian 8 Posted September 24, 2014 Share Posted September 24, 2014 The league is no more, the trainer card generator is broken, the search feature is your friend. Link to post Share on other sites
Neith 0 Posted September 24, 2014 Author Share Posted September 24, 2014 I have no friends Shame, was kinda looking forward to it, I'll make sure to next time, thanks Link to post Share on other sites
KnightZhroud 0 Posted September 24, 2014 Share Posted September 24, 2014 With a little of Photoshop/Graphic Gale skills you can easily create one yourself.... Link to post Share on other sites
Recommended Posts
Archived
This topic is now archived and is closed to further replies.