Comments (17)
You're right, there's something funky going on with authentication and I also got the key error. The only way I could get it to work was rolling back the git repo to my latest commit:
git checkout 5fe8e073e710cef48133dd8a3070c84c5adcbb6b
python setup.py install
All examples worked, etc. Not sure what these guys did, but apparently it's not working. Maybe I should rollback the repository to commit that actually works.
from txmongo.
I will take a look at this as well tomorrow. I have been needing to look at the authentication bit for a while.
from txmongo.
I'm relieved I'm not that only one seeing this, and thanks a bunch for the pointer to a version that should fly.
I spent the day trying to track it down but was flummoxed in collection.py
by the __str__
and __repr__
in Collection
making it very hard to print out values.
I was getting a key error because connection.py
in (... if I remember right) get_authenticated_protocol
which was trying to de-ref self.cred_cache
on database_name
.
The kicker with all this is that I don't have ANY auth stuff turned on (which I believe would be consistent with self.cred_cache
being empty, and hence having the key error). I couldn't figure out why this would run, and my best guess is the pattern that repeats in most of the commands in collections.py
like the following:
if self._database.__authenticated :
proto = yield self._database.connection.get_authenticated_protocol(self._database)
else :
proto = yield self._database.connection.getprotocol()
The kicker to the kicker is that I can't figure out what self._database.__authenticated
equates to, because of the __str__
rewrites.
My theory is that between the __str__
and the __repr__
, they are messing up that conditional so it always resolves true (even when there is no auth, hence causing a de-ref in connection.py
down stream), but I don't have the python skill to prove that or know quite how to fix it.
(When I talk about str and repr I really mean all the double underscore property mucking stuff)
from txmongo.
@fiorix I am all for rolling back the repository. There were a lot of changes in that last pull request.
from txmongo.
Yeah I thought about trying to fix that but looked again and again and... big no no. It's now sort of mixed with pymongo and doing weird things, maybe in the wrong way - it isn't working after all.
Could you please investigate a bit more to help me find out what is the good commit to rollback to? The one I mentioned before was my last commit, but doesn't mean it's the last good one.
Cheers
On Mar 28, 2014, at 10:43 AM, Trenton Broughton [email protected] wrote:
@fiorix I am all for rolling back the repository. There were a lot of changes in that last pull request.
—
Reply to this email directly or view it on GitHub.
from txmongo.
Sure! I will take a look.
from txmongo.
I am still down the rabbit hole checking on this. There are a lot of commits from a few different people, so there seems to be quite a lot of fragmentation.
from txmongo.
Ah ha! I have tracked down the source of the problems. I will have a pull request soon (after I fix a couple more test failures)
from txmongo.
Nice! :)
On Mar 28, 2014, at 8:58 PM, Trenton Broughton [email protected] wrote:
Ah ha! I have tracked down the source of the problems. I will have a pull request soon (after I fix a couple more test failures)
—
Reply to this email directly or view it on GitHub.
from txmongo.
There are still a lot of tests to write (coverage reports 64%), but at least it is functional now. I will continue working on this and sending pull requests as necessary.
from txmongo.
That's fine, take your time.
On Mar 29, 2014, at 12:48 AM, Trenton Broughton [email protected] wrote:
There are still a lot of tests to write (coverage reports 64%), but at least it is functional now. I will continue working on this and sending pull requests as necessary.
—
Reply to this email directly or view it on GitHub.
from txmongo.
make test no longer fails for me, and if @milutz can confirm, then this issue can probably be closed.
from txmongo.
I should have some time I can test tomorrow. Should I test off this repo or one that you have Trenton?
-Mike
On Mar 29, 2014, at 11:31 PM, Trenton Broughton [email protected] wrote:
make test no longer fails for me, and if @milutz can confirm, then this issue can probably be closed.
—
Reply to this email directly or view it on GitHub.
from txmongo.
@milutz The changes I made have all been merged into this repo. My master branch is out of date, so use this one. Let me know if you run into any issues, I'm still working on getting test coverage.
from txmongo.
Can we close this?
from txmongo.
I believe so. I just pulled down a fresh copy yesterday and ran the tests successfully.
from txmongo.
Cool. Thanks!
from txmongo.
Related Issues (20)
- In disconnect: RuntimeError: dictionary changed size during iteration HOT 2
- When txmongo fails to connect mongodb, there is a memory leak HOT 8
- latest txmongo does not work with pymongo 3.7 HOT 3
- do not connect to mongodb+srv:// scheme HOT 1
- Does txmongo support compressors option? HOT 1
- builtins.AttributeError: '_CaseInsensitiveDictionary' object has no attribute 'copy' HOT 3
- Crash create_index: pymongo.errors.OperationFailure: cannot write to 'remains.system.indexes' HOT 2
- AssertionError: Tried to stop a LoopingCall that was not running. HOT 3
- txmongo not working with azure cosmos db HOT 19
- There should be a limit on the number of retries HOT 1
- insert_many does not work properly HOT 6
- maxIdleTimeMS support HOT 4
- does txmongo support transaction? HOT 2
- Proposing a PR to fix a few small typos HOT 1
- insert_many: unexpected keyword argument 'bypass_document_validation' in calling pymongo `_Bulk` HOT 2
- Import error with PyMongo==4.1.1. HOT 3
- Incompatible with mongodb >= 5.1 due to usage of deprecated `OP_QUERY` commands HOT 2
- txmongo with DocumentDB
- Incompatible with any version of DocumentDB HOT 3
- pymongo.errors.OperationFailure: TxMongo: not authorized for query on foo.test HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from txmongo.