Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bug caused by bson ObjectIds? #11

Closed
bnic opened this issue Dec 6, 2012 · 1 comment
Closed

Possible bug caused by bson ObjectIds? #11

bnic opened this issue Dec 6, 2012 · 1 comment

Comments

@bnic
Copy link

bnic commented Dec 6, 2012

The connector inserts one document then barfs. I tried pyelasticsearch to manually populate and received the same error until I cast the ObjectId into a string.

Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/mongo-connector/oplog_manager.py", line 101, in run
cursor = self.init_cursor()
File "/usr/local/lib/python2.7/dist-packages/mongo-connector/oplog_manager.py", line 298, in init_cursor
timestamp = self.dump_collection()
File "/usr/local/lib/python2.7/dist-packages/mongo-connector/oplog_manager.py", line 268, in dump_collection
self.doc_manager.upsert(doc)
File "./doc_managers/elastic_doc_manager.py", line 77, in upsert
self.elastic.index(doc, index, doc_type, doc_id)
File "/usr/local/lib/python2.7/dist-packages/pyes/es.py", line 1142, in index
return self._send_request(request_method, path, doc, querystring_args)
File "/usr/local/lib/python2.7/dist-packages/pyes/es.py", line 574, in _send_request
body = json.dumps(body, cls=self.encoder)
File "/usr/lib/python2.7/json/__init
.py", line 240, in dumps
**kw).encode(obj)
File "/usr/lib/python2.7/json/encoder.py", line 203, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python2.7/json/encoder.py", line 266, in iterencode
return _iterencode(o, 0)
ValueError: Circular reference detected

@ghost ghost assigned tjj5036 Jul 16, 2013
@tjj5036
Copy link
Contributor

tjj5036 commented Aug 8, 2013

I'm going to close this issue- I could not reproduce it. I think this was caused by a bug in the way that ObjectIDs, DBRefs, etc were being encoded that was just fixed in the latest commit. If this is still an issue, please reopen the issue.

@tjj5036 tjj5036 closed this as completed Aug 8, 2013
lnader pushed a commit to lnader/mongo-connector that referenced this issue Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants