I'm having a big problem with a get_or_create call, I'm doing it just fine at the local level, and the same The script is working online on any other site. Did anyone know what's going on?
I get "IntegrityError: (1062," key 'primary' for '2147483647 duplicates') "whenever I run the script ...
tweets TwitterSearchFeed.entries: if tweet.id [0: 3] == 'tag': tweet_id = tweet.id.split (':') [2] # tweet .id [tweet.id.rindex (':' ) + 1:] #Tig: search.twitter.com, 2005: 10016544708 screen_name = tweeted.Atherspire ('(') [0] .stip () text = smart_incode (tweet .tatal) pub_time = time.strptime (tweet. Published, "% Y-% m-% dT% H:% M:% SZ") # 2010-01-01T22: 20: 55Z pub_time = datetime.datetime.fromtimestamp (time.make time) (pub_time) # UTC name = Tweet .author.split ('(') [1] .split (')') [0] .strip () # Make sure that the poster comes after the kickoff after 30 minutes if pub_time (game.kickoff - Datetime.timedelta (min = 30)): # filter RT if not text [= 3:] == "RT": # Add or Tweet @ Tweet @ {@ twitter_id ': tweet_id,' pub_t ime ': pub_time, Text ',' name ': name,' username ': screen_name,' game ': game,' atthegame ': atthegame} obj, made = tweak.obsults.get_or_create (twitter_id = tweet_id, defaults = Tweet_dict) if created Gone: Output + = "Added Twitter -% s,% s, '% s' & lt; Br /> "% (tweet_id, screen_name, text) Other: Output + =" Tweet% s already exists & lt; Br / & gt; "% Tweet_id Other: Output + =" Tweet ID error & lt; Br / & gt; "Back to HttpResponse
My guess is that you are suffering from: < / P>
Comments
Post a Comment