Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 05 07:32
    yypptest edited #1939
  • Sep 05 05:19
    yypptest commented #1939
  • Sep 05 05:19
    yypptest commented #1939
  • Aug 24 16:56
    gkprasanth commented #1696
  • Aug 02 10:50

    github-actions[bot] on v0.27.0

    (compare)

  • Aug 02 08:44

    jacobtomlinson on master

    Fix channel count when retrievi… (compare)

  • Aug 02 08:44
    jacobtomlinson closed #1943
  • Aug 01 13:20
    codecov[bot] commented #1943
  • Aug 01 10:39
    codecov[bot] commented #1943
  • Aug 01 10:37
    codecov[bot] commented #1943
  • Aug 01 10:35
    codecov[bot] commented #1943
  • Aug 01 10:35
    codecov[bot] commented #1943
  • Aug 01 10:34
    codecov[bot] commented #1943
  • Aug 01 10:29
    chillipeper synchronize #1943
  • Aug 01 09:01

    jacobtomlinson on master

    Add py310 to envlist in tox.ini… (compare)

  • Aug 01 09:01
    jacobtomlinson closed #1944
  • Aug 01 08:58
    codecov[bot] commented #1944
  • Jul 29 11:22
    chillipeper review_requested #1943
  • Jul 29 09:54
    codecov[bot] commented #1944
  • Jul 29 09:52
    codecov[bot] commented #1944
Cadair
@cadair:cadair.com
[m]
My guess is something path related. Seeing how it just says "module can not be imported"
hkonala
@hkonala

Strange. Could you raise an issue on GitHub?

Definitely @_slack_opsdroid_U5MK1BW83:matrix.org

My guess is something path related. Seeing how it just says "module can not be imported"

Even I thought the same at first @cadair:cadair.com but the thing is, there is no fixed set of skills which are always failing to load. it is random after each restart

jindalo
@jindalo:matrix.org
[m]

Hi all, I am getting this error while loading database module in opsdroid. I am running this on containers.

DEBUG asyncio: Using selector: EpollSelector
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 900, in _find_spec
AttributeError: '_Importer' object has no attribute 'find_spec'

Can someone please help me here. Not sure what I am missing.
If I remove DB config from the configuration.yaml, everything works fine.

Cadair
@cadair:cadair.com
[m]
What database are you configuring?
Also what version of Python/opsdroid
oshien jindal
@jindalo:matrix.org
[m]
Custom DB - postgres
Python- 3.7
Opsdroid - 0.19.0
hkonala
@hkonala

Strange. Could you raise an issue on GitHub?

raised opsdroid/opsdroid#1761

@_slack_opsdroid_U5MK1BW83:matrix.org please take look when you have time
FabioRosado
@fabiorosado:matrix.org
[m]

I feel very dumb... looking at this code in logging:

    try:
        if config["logging"]["path"]:
            logfile_path = os.path.expanduser(config["logging"]["path"])
        else:
            logfile_path = config["logging"]["path"]
    except KeyError:
        logfile_path = DEFAULT_LOG_FILENAME

Reference

I'm assuming because we can set path to false, that's the reason why we have that if/else statement there? 🤔

Jacob Tomlinson (Slack)
@_slack_opsdroid_U5MK1BW83:matrix.org
[m]
Yeah its because it can be false. The os.path.expanduser will fail if passed false.
If I were writing this today I'd probably use a try/except instead to catch the error when expanduser is passed false.
FabioRosado
@fabiorosado:matrix.org
[m]
Oh and now I get it why we were getting the logfile_path check for the file handler! I was assuming logfile always returned something
Jacob Tomlinson (Slack)
@_slack_opsdroid_U5MK1BW83:matrix.org
[m]
It's also a good use case for the walrus operator. Roll on Python 3.8!
FabioRosado
@fabiorosado:matrix.org
[m]
but is so weird haha
Jacob Tomlinson (Slack)
@_slack_opsdroid_U5MK1BW83:matrix.org
[m]
Yup haha
FabioRosado
@fabiorosado:matrix.org
[m]
I've seen one of those at work and I had to read upon it since I had no idea what the heck the thing did
Jacob Tomlinson (Slack)
@_slack_opsdroid_U5MK1BW83:matrix.org
[m]
Heh they are pretty new and 3.8+ so you dont see too many of them in the wild yet
FabioRosado
@fabiorosado:matrix.org
[m]
I shall try to use the walrus :D
FabioRosado
@fabiorosado:matrix.org
[m]
Opened a quick draft pr since I changed some things around and got the tmp folder tests failing locally
FabioRosado
@fabiorosado:matrix.org
[m]

I've finally finished the opsdroid/opsdroid#1767, I've added a video so you can see how the logs look like without having to test locally.

Cadair I've also added a new formatter config so a user can choose a formatting string. I remember you mentioned that it would be good to allow a user to do this 👍️

Cadair
@cadair:cadair.com
[m]
Oooh nice. Can look at it towards the end of the week.
FabioRosado
@fabiorosado:matrix.org
[m]
No worries I had that open for a while and only sat down to finish it off now haha
Oleg
@oleg:fiksel.info
[m]
How do you debug skills?
I'm using Pycharm and a python venv with installed opsdroid.
Unfortunately my breakpoints don't stop at the skill script. ☹️
1 reply
Jacob Tomlinson (Slack)
@_slack_opsdroid_U5MK1BW83:matrix.org
[m]
You've got to have your debugger launch the opsdroid module. I generally use VSCode and it works fine.
FabioRosado
@fabiorosado:matrix.org
[m]
Whenever someone has time can I eyes on the Rich logging PR?
cognifloyd (Jacob Floyd)
@cognifloyd:matrix.org
[m]
In PyCharm (pro) for remote debugging, PyCharm offers to map the paths to the local paths. I wonder if there's a similar option to handle this.
Jacob Tomlinson
@jacobtomlinson:matrix.org
[m]
Found some time to write some opsdroid code. Thought I'd rewrite some tests as I haven't actually used the new test machinery since Cadair polished it off. All I can say is that was super satisfying! I'm really happy with how we can write tests for external services now. opsdroid/opsdroid#1800
Cadair
@cadair:cadair.com
[m]
nice
A good test is very satisfying lol
Jacob Tomlinson
@jacobtomlinson:matrix.org
[m]
To bump a question on my Teams PR. I'd like to use VCRpy for testing because the Teams API and SDK are gross and canning responses by hand is hard. Any objections?
Cadair
@cadair:cadair.com
[m]
lol
I don't see why not
Jacob Tomlinson (Slack)
@_slack_opsdroid_U5MK1BW83:matrix.org
[m]
👍
cognifloyd (Jacob Floyd)
@cognifloyd:matrix.org
[m]
Yeah VCRpy should be fine
Jacob Tomlinson
@jacobtomlinson:matrix.org
[m]
I hate teams...
SolarDrew
@solardrew:openastronomy.org
[m]
from my limited experience with it that seems to be the intended response
Cadair
@cadair:cadair.com
[m]
Lol
Jacob Tomlinson (Slack)
@_slack_opsdroid_U5MK1BW83:matrix.org
[m]
I was struggling to use VCRpy or our request mocking because some of the URLs include a randomised UUID which changes every time! WHyyyyyyy!
FabioRosado
@fabiorosado:matrix.org
[m]

That seems like a great Microsoft idea 😄

We were struggling with getting logs from azure because Microsoft decided to make one part of the storage url random 🤦‍♂️

Jacob Tomlinson (Slack)
@_slack_opsdroid_U5MK1BW83:matrix.org
[m]
It's such a PITA!
FabioRosado
@fabiorosado:matrix.org
[m]
But maybe they did implement some useless thing like again I. Azure it seems that they take a screen shot of the file in storage. Because when you are storing text files you really need a screenshot with the first logs 🤣
All the urls have that UUID?
Jacob Tomlinson (Slack)
@_slack_opsdroid_U5MK1BW83:matrix.org
[m]
It seems like when creating a message with Teams you POST to a URL with a randomised uuid on the end, that UUID becomes the UUID of the message. But it's the local SDK that created the UUID, which is a bit weird IMO. usually you would just post to some generic endpoint and the server side creates the UUID and returns it in the response.
So using VCR to record call fails because that URL changes every time you run the tests. I guess I'll need to implement a custom handler, but thats just annoying.
FabioRosado
@fabiorosado:matrix.org
[m]
Oh I see that sucks
Jacob Tomlinson (Slack)
@_slack_opsdroid_U5MK1BW83:matrix.org
[m]
Yup
cognifloyd (Jacob Floyd)
@cognifloyd:matrix.org
[m]
I replied to this in the Teams PR. I think you could add a pytest fixture that generates a consistent list of UUIDs.