Skip to content

Instantly share code, notes, and snippets.

@Tendrid
Created October 23, 2012 03:45
Show Gist options
  • Save Tendrid/3936500 to your computer and use it in GitHub Desktop.
Save Tendrid/3936500 to your computer and use it in GitHub Desktop.
insert charts fail
tendrid@Aegis:~/git/shannon$ simpleseer script utils/insert_charts.py
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.inspection plugin fastener
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.inspection plugin circles
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.inspection plugin blobs
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.inspection plugin keypointTemplate
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.inspection plugin region
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.inspection plugin object
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.inspection plugin lines
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.inspection plugin face
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.inspection plugin motion
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.inspection plugin opc
2012-10-22 23:42 SimpleSeer.models.base ERROR Failed to load seer.plugins.inspection plugin opc: No module named OPC
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.inspection plugin simpleTemplate
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.inspection plugin ocr
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.inspection plugin edgeWidth
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.inspection plugin barcodes
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.measurement plugin blob_length
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.measurement plugin blob_radius
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.measurement plugin blob_count
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.measurement plugin closestcolor
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.measurement plugin timebetween
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.measurement plugin closestcolorml
2012-10-22 23:42 SimpleSeer.models.base INFO Loading seer.plugins.watcher plugin smsalert
2012-10-22 23:42 SimpleSeer.models.base ERROR Failed to load seer.plugins.watcher plugin smsalert: No module named twilio.rest
Deleting old OLAPs and charts
Constructing one OLAP/Chart per measurement
ERROR:
Traceback (most recent call last):
File "/usr/local/bin/simpleseer", line 7, in <module>
execfile(__file__)
File "/home/tendrid/git/SimpleSeer/scripts/simpleseer", line 48, in <module>
main()
File "/home/tendrid/git/SimpleSeer/scripts/simpleseer", line 45, in main
options.subcommand.run()
File "/home/tendrid/git/SimpleSeer/SimpleSeer/commands/script.py", line 24, in run
exec fp in ns,ns
File "utils/insert_charts.py", line 15, in <module>
o = of.fromFields([xf] + yf, olap=o)
File "/home/tendrid/git/SeerCloud/SeerCloud/OLAPUtils.py", line 133, in fromFields
return self.fillOLAP(olap)
File "/home/tendrid/git/SeerCloud/SeerCloud/OLAPUtils.py", line 195, in fillOLAP
results = o.execute()
File "/home/tendrid/git/SeerCloud/SeerCloud/models/OLAP.py", line 78, in execute
results = self.doQuery(filterParams)
File "/home/tendrid/git/SeerCloud/SeerCloud/models/OLAP.py", line 168, in doQuery
count, frames = f.getFrames(filterParams, skip=self.skip, limit=self.limit, sortinfo=self.sortInfo, timeEpoch = False)
File "/home/tendrid/git/SimpleSeer/SimpleSeer/Filter.py", line 54, in getFrames
cmd = db.command('aggregate', 'frame', pipeline = pipeline)
File "/usr/local/lib/python2.7/dist-packages/pymongo/database.py", line 393, in command
msg, allowable_errors)
File "/usr/local/lib/python2.7/dist-packages/pymongo/helpers.py", line 144, in _check_command_response
raise OperationFailure(msg % details["errmsg"])
OperationFailure: command SON([('aggregate', 'frame'), ('pipeline', [{'$project': {'features': 1, 'imgfile': 1, 'results': 1, 'height': 1, 'results.numeric': 1, 'results.measurement_name': 1, 'id': '$_id', 'results.measurement_id': 1, 'results.inspection_id': 1, 'capturetime_epoch': 1, 'notes': 1, 'results.string': 1, 'width': 1, 'camera': 1, 'capturetime': 1, '_id': 1, 'metadata': 1}}, {'$match': {'capturetime': {'$exists': True}}}, {'$match': {'results': {'$elemMatch': {'measurement_name': u'lbs_diameter_mm', u'numeric': {'$exists': True}}}}}, {'$sort': {'capturetime': 1}}])]) failed: exception: can't add an expression for a subfield of results because there is already an expression that applies to the whole field
2012-10-22 23:42 Main Logger ERROR
Traceback (most recent call last):
File "/usr/local/bin/simpleseer", line 7, in <module>
execfile(__file__)
File "/home/tendrid/git/SimpleSeer/scripts/simpleseer", line 48, in <module>
main()
File "/home/tendrid/git/SimpleSeer/scripts/simpleseer", line 45, in main
options.subcommand.run()
File "/home/tendrid/git/SimpleSeer/SimpleSeer/commands/script.py", line 24, in run
exec fp in ns,ns
File "utils/insert_charts.py", line 15, in <module>
o = of.fromFields([xf] + yf, olap=o)
File "/home/tendrid/git/SeerCloud/SeerCloud/OLAPUtils.py", line 133, in fromFields
return self.fillOLAP(olap)
File "/home/tendrid/git/SeerCloud/SeerCloud/OLAPUtils.py", line 195, in fillOLAP
results = o.execute()
File "/home/tendrid/git/SeerCloud/SeerCloud/models/OLAP.py", line 78, in execute
results = self.doQuery(filterParams)
File "/home/tendrid/git/SeerCloud/SeerCloud/models/OLAP.py", line 168, in doQuery
count, frames = f.getFrames(filterParams, skip=self.skip, limit=self.limit, sortinfo=self.sortInfo, timeEpoch = False)
File "/home/tendrid/git/SimpleSeer/SimpleSeer/Filter.py", line 54, in getFrames
cmd = db.command('aggregate', 'frame', pipeline = pipeline)
File "/usr/local/lib/python2.7/dist-packages/pymongo/database.py", line 393, in command
msg, allowable_errors)
File "/usr/local/lib/python2.7/dist-packages/pymongo/helpers.py", line 144, in _check_command_response
raise OperationFailure(msg % details["errmsg"])
OperationFailure: command SON([('aggregate', 'frame'), ('pipeline', [{'$project': {'features': 1, 'imgfile': 1, 'results': 1, 'height': 1, 'results.numeric': 1, 'results.measurement_name': 1, 'id': '$_id', 'results.measurement_id': 1, 'results.inspection_id': 1, 'capturetime_epoch': 1, 'notes': 1, 'results.string': 1, 'width': 1, 'camera': 1, 'capturetime': 1, '_id': 1, 'metadata': 1}}, {'$match': {'capturetime': {'$exists': True}}}, {'$match': {'results': {'$elemMatch': {'measurement_name': u'lbs_diameter_mm', u'numeric': {'$exists': True}}}}}, {'$sort': {'capturetime': 1}}])]) failed: exception: can't add an expression for a subfield of results because there is already an expression that applies to the whole field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment