Code Monkey home page Code Monkey logo

Comments (17)

fiorix avatar fiorix commented on July 23, 2024

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.

trenton42 avatar trenton42 commented on July 23, 2024

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.

milutz avatar milutz commented on July 23, 2024

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.

trenton42 avatar trenton42 commented on July 23, 2024

@fiorix I am all for rolling back the repository. There were a lot of changes in that last pull request.

from txmongo.

fiorix avatar fiorix commented on July 23, 2024

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.

trenton42 avatar trenton42 commented on July 23, 2024

Sure! I will take a look.

from txmongo.

trenton42 avatar trenton42 commented on July 23, 2024

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.

trenton42 avatar trenton42 commented on July 23, 2024

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.

fiorix avatar fiorix commented on July 23, 2024

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.

trenton42 avatar trenton42 commented on July 23, 2024

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.

fiorix avatar fiorix commented on July 23, 2024

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.

trenton42 avatar trenton42 commented on July 23, 2024

make test no longer fails for me, and if @milutz can confirm, then this issue can probably be closed.

from txmongo.

milutz avatar milutz commented on July 23, 2024

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.

trenton42 avatar trenton42 commented on July 23, 2024

@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.

fiorix avatar fiorix commented on July 23, 2024

Can we close this?

from txmongo.

trenton42 avatar trenton42 commented on July 23, 2024

I believe so. I just pulled down a fresh copy yesterday and ran the tests successfully.

from txmongo.

fiorix avatar fiorix commented on July 23, 2024

Cool. Thanks!

from txmongo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.