NatTupper / dline

A feature-rich terminal discord client
GNU General Public License v3.0
63 stars 4 forks source link

Startup failure #1

Closed Xavyrr closed 6 years ago

Xavyrr commented 6 years ago

Installed the dev branch of mistletoe and got this error on startup:

Starting...

/home/xavyrr/Discline/client/client.py:45: RuntimeWarning: coroutine 'init_channel_messageEdit' was never awaited
  init_channel_messageEdit(channel)
Ignoring exception in on_ready
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/discord/client.py", line 307, in _run_event
    yield from getattr(self, event)(*args, **kwargs)
  File "Discline.py", line 61, in on_ready
    gc.client.current_channel = settings["default_channel"].lower()
  File "/usr/lib/python3.6/site-packages/discord/client.py", line 302, in __setattr__
    object.__setattr__(self, name, value)
  File "/home/xavyrr/Discline/client/client.py", line 58, in current_channel
    self._prompt = channel.name
AttributeError: 'str' object has no attribute 'name'
^CTraceback (most recent call last):
  File "Discline.py", line 225, in <module>
    if __name__ == "__main__": main()
  File "Discline.py", line 213, in main
    curses.nocbreak()
_curses.error: must call initscr() first
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f2f2ec3d198>
NatTupper commented 6 years ago

Can you reset your config to default and try that? If you do that, you'll also need to join the Discline discord server. I do recommend this anyhow.

Xavyrr commented 6 years ago

Doesn't seem to have fixed it, I removed the config with rm ~/.config/Discline/config and then cloned the skeleton config with cd ~/Discline python3 Discline.py --copy-skeleton The error is identical.

NatTupper commented 6 years ago

How long ago did you clone this repository? Also how many servers are you connected to? I've only tested this with an account with only a few servers.

Xavyrr commented 6 years ago

I re cloned it last night before reporting back. I have also uninstalled all the python dependencies with pip3 uninstall <dependency package names> and have reinstalled them with the no-cache-dir argument to make sure the downloads were fresh. I should note that the client does work with the original master branch. Looking at my error it seems to me that it's potentially related to discord.py, but I can't say for sure.

If it helps at all I'm using Linux/Manjaro w/ Budgie as my DE, and gnome-terminal.

NatTupper commented 6 years ago

The original master branch being Mitch's repo? Hmm... the error on line 58 seems to have occurred due to the if type(channel) is str: check being skipped somehow. I'm not sure why. What version of discord.py do you have?

Xavyrr commented 6 years ago

It should be the latest available from using pip3, so 0.16.12 I think.

NatTupper commented 6 years ago

That is the latest version. Could you try an alt account? If the alt account works, then it's not your system that's the problem, it's discline.

Xavyrr commented 6 years ago

I just tried a freshly made account with a single test server, I still get the same error.

NatTupper commented 6 years ago

Okay. I'm able to replicate it with a default config. Looking into fixing it.

NatTupper commented 6 years ago

Okay. So it looks like the default config defines default_server as discline. Changing discline to Discline fixes the bug for me.

Xavyrr commented 6 years ago

Going into my config DID fix it! Thanks for the help.