Skip to content

Instantly share code, notes, and snippets.

try:
instance = create_instance(
username,
xml_file_list[0],
media_files
)
except Exception, e:
import traceback
tb = traceback.format_exc()
finally:
In [13]: t=(1,2)
In [15]: t
Out[15]: (1, 2)
In [16]: t+=(3,)
In [17]: t
Out[17]: (1, 2, 3)
Traceback (most recent call last):
File "/home/ubuntu/srv/formhub-ec2/project_env/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/ubuntu/srv/formhub-ec2/formhub/main/views.py", line 108, in profile
context.message = publish_form(set_form)
File "/home/ubuntu/srv/formhub-ec2/formhub/utils/logger_tools.py", line 80, in publish_form
return callback()
..........................F
======================================================================
FAIL: test_process (main.tests.test_past_bugs.TestCSVExport)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/euler/sites/formhub/main/tests/test_past_bugs.py", line 14, in test_process
TestSite.test_process(self)
File "/home/euler/sites/formhub/main/tests/test_process.py", line 18, in test_process
self._check_formList()
File "/home/euler/sites/formhub/main/tests/test_process.py", line 128, in _check_formList
@pld
pld / gist:2884329
Created June 6, 2012 19:54
python manage.py create_image_thumbnails
python
/home/ubuntu/srv/formhub-ec2/project_env/lib/python2.6/site-packages/registration/models.py:4: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
import sha
Error on attachments/1317631378822.jpg: HTTP Error 404: Not Found
Error on attachments/1317631269344.jpg: HTTP Error 404: Not Found
Error on prayasam/attachments/1330081148811.jpg: [Errno 2] No such file or directory: u'/home/ubuntu/srv/formhub-ec2/formhub/media/prayasam/attachments/1330081148811-lrg.jpg'
Error on kkennedy00/attachments/1318346224159.jpg: [Errno 2] No such file or directory: u'/home/ubuntu/srv/formhub-ec2/formhub/media/kkennedy00/attachments/1318346224159-lrg.jpg'
Traceback (most recent call last):
File "manage.py", line 14, in <module>
execute_manager(settings)
@pld
pld / local-bamboo-pip-freeze
Created July 2, 2012 18:06
bamboo pip freeze
CherryPy==3.2.2
Fabric==1.4.2
amqplib==1.0.2
anyjson==0.3.1
blessings==1.4
celery==2.5.5
celery-with-mongodb==2.5
cov-core==1.6
coverage==3.5.2
kombu==2.1.8
Formhub Syntax help:
* http://formhub.org/syntax/
Example XLSFiles:
* http://formhub.org/formhub_u/
Basic Website Functioning
(ns aggregate.fail
(:use [cascalog.api]
[midje sweet cascalog]))
(defn f [base-input-path source-pattern]
(<- [?a ?b ?c]
((hfs-textline base-input-path :source-pattern source-pattern) ?a ?b ?c)))
(fact?-
[["a" 1 "c1"]
@pld
pld / gist:81079ade4b52fafa9e81
Created September 30, 2014 11:03
JSONForm for a simple text field
{
"name": "pizza_survey_simpler",
"title": "pizza_survey_simpler",
"type": "survey",
"default_language": "default",
"id_string": "pizza_survey_simpler",
"sms_keyword": "pizza_survey_simpler",
"children": [
{
"bind": {"required": "yes"},
@pld
pld / sample submission format
Last active August 29, 2015 14:07
sample submission format
{
"id": "pizza_survey_simple",
"submission": {
"name": "peter"
}
}