anoadragon453 / nio-template

A template for creating matrix bots in python with matrix-nio
Apache License 2.0
78 stars 27 forks source link

If e2e dependencies are not installed, login will fail with Error logging in: No store class was provided in the config. #4

Open anoadragon453 opened 4 years ago

anoadragon453 commented 4 years ago

Login will fail with the following if python-nio python bindings are not installed in the python environment:

2020-04-06 22:30:29,903 | __main__ [CRITICAL] Error logging in: No store class was provided in the config.

Does matrix-nio need the store put in a different spot depending on whether python bindings are installed?

djl0 commented 4 years ago

I appreciate your work on this. I'm following to see when you can help with this (along with libolm setup issue) because I think without store, I can't store the sync token, which is a pain. Thanks!

anoadragon453 commented 4 years ago

Unfortunately this is an upstream problem with matrix-nio. I could possibly reintroduce storing the synctoken in the database, but it had a habit of killing the server: #2

Perhaps providing a docker image which has the dependencies already installed would help?

djl0 commented 4 years ago

a docker image would be amazing. In order to run this template even without encryption, I had to comment out a line in the Nio base_client which required the store class in the config. Not sure if I missed something, though.

Much thanks!

PeterSR commented 4 years ago

@anoadragon453 Seems like you already have contributed with such a Docker image here: https://github.com/poljar/matrix-nio/tree/master/docker

But it would be nice to just be able to use it without encryption and OLM. @djl0, can you explain a bit more about what you did?

djl0 commented 4 years ago

@PeterSR apologies for the delay. This has been on the back burner for a while, so I don't remember exactly. I will try to pull it up at some point. It looks like the Nio code has changed a bit as well in the last couple of months, so maybe they fixed it? But I was just running this without encryption, there there were some errors in the Nio package regarding store, and I just had to comment those out. It was in this file: https://github.com/poljar/matrix-nio/blob/master/nio/client/base_client.py

PeterSR commented 4 years ago

@djl0 No worries, thank you for the reply. I ended up getting OLM to work and it fixed the problems I was facing, even when encryption is disabled in the client config.

If you commented out parts of matrix-nio, I guess you didn't install it via pip?

Edit: My main issue now is actually that sync tokens are not properly stored in the store (sqlite db) sometimes.