Skip to content

Instantly share code, notes, and snippets.

View smickles's full-sized avatar

Michael Carver smickles

View GitHub Profile
(evething)[smickles@localhost evething]$ python import.py
=> Region: 0 (0.02s)
=> Constellation:
Traceback (most recent call last):
File "import.py", line 792, in <module>
importer.import_all()
File "import.py", line 108, in import_all
time_func('Constellation', self.import_constellation)
File "import.py", line 95, in time_func
added = f()
@smickles
smickles / gist:56a1b36d0f96ce74fd52
Created June 1, 2014 19:20
Fix import.py for postgresql
diff --git a/import.py b/import.py
index 793ce21..ebe80c6 100755
--- a/import.py
+++ b/import.py
@@ -108,7 +108,7 @@ class Importer:
def __init__(self):
self.cursor = connections['import'].cursor()
# sqlite3 UTF drama workaround
- connections['import'].connection.text_factory = lambda x: unicode(x, "utf-8", "ignore")
+ # TODO connections['import'].connection.text_factory = lambda x: unicode(x, "utf-8", "ignore")
@smickles
smickles / gist:1854748
Created February 17, 2012 18:34
syntaxerror
Traceback (most recent call last):
File "activate_gox_stream.py", line 3, in <module>
from socketio import SocketIO
File "/home/michael/bitcoin/gox_socketio_py/socketio.py", line 3, in <module>
import simplejson as json
ImportError: No module named simplejson
michael@pickles:~/bitcoin/gox_socketio_py$ python3.2 activate_gox_stream.py
File "activate_gox_stream.py", line 26
print "subscribed to channel",channel_name
^