Giter Site home page Giter Site logo

Comments (13)

lasers avatar lasers commented on August 20, 2024 1

Solved via #380? Can we close this issue?

from i3pystatus.

enkore avatar enkore commented on August 20, 2024

Probably duplicate of #101 ?

from i3pystatus.

enkore avatar enkore commented on August 20, 2024

Confirmed not-a-duplicate of #101

What is the configuration (without passwords and so on of course) of the mail module?

from i3pystatus.

halocaridina avatar halocaridina commented on August 20, 2024

See below.

status.register("mail",
email_client="/usr/local/bin/mutt",
format=": {unread}",
format_plural=": {unread}",
color_unread="#00FFFF",
backends=[
imap.IMAP(
# port and ssl are the defaults
host="XXXXX", port=993, ssl=True,
username="XXXXX", password="XXXXX"
)
])

There was also a similarly worded error on a recent wake-from-suspend involving the weather module. Unfortunately, I don't have the exact error message due to log rotation of .xsession_error. The weather module is configured like so:

status.register("weather",
location_code="XXXXX",
colorize=True,
units="imperial")

from i3pystatus.

enkore avatar enkore commented on August 20, 2024

Does 9cdcfcc fix this for you?

from i3pystatus.

enkore avatar enkore commented on August 20, 2024

Note: Might lead to issues with the dbus-based backends, like the Thunderbird one

from i3pystatus.

halocaridina avatar halocaridina commented on August 20, 2024

Thank you. Just updated i3pystatus via:

pacaur -y i3pystatus-git

I'll report the results over the next 24-48 hours.

Thank you again and more soon.

from i3pystatus.

halocaridina avatar halocaridina commented on August 20, 2024

Following the above update, logged out and back into i3 to ensure a clean start of i3pystatus and fresh .xsession_error. Suspended the machine for ~30 min with lid being closed. Upon awake, error is:

no connectionException in Thread-4 at Wed Aug 27 09:34:58 2014
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/i3pystatus/core/threading.py", line 68, in call
self.workload()
File "/usr/lib/python3.4/site-packages/i3pystatus/core/modules.py", line 67, in call
self.run()
File "/usr/lib/python3.4/site-packages/i3pystatus/core/util.py", line 346, in wrapper
return method(_args, *_kwargs)
File "/usr/lib/python3.4/site-packages/i3pystatus/mail/init.py", line 46, in run
unread = sum(map(lambda backend: backend.unread, self.backends))
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

First two lines (68 and 67) are as in original report while line 346 is new and line 44 has changed to line 46.

Hope this helps to narrow the issue down.

from i3pystatus.

enkore avatar enkore commented on August 20, 2024

Good, I'll add some sort of DNS availability check to internet(), which should fix this.

from i3pystatus.

halocaridina avatar halocaridina commented on August 20, 2024

Hi Enkore,

I noticed that this issue was closed. Unfortunately, I've been still experiencing issues with the IMAP module when resuming from suspend. Specifically, the module doesn't correctly resume until I do a restart via a custom script:

bindsym $mod+Shift+r exec --no-startup-id /usr/local/bin/reload_statusbar.sh

containing:

#!/bin/bash
/usr/bin/pkill -f nm-applet >/dev/null 2>&1
/usr/bin/pkill -f parcellite >/dev/null 2>&1
/usr/bin/pkill -f caffeine >/dev/null 2>&1
/usr/bin/pkill -f pasystray >/dev/null 2>&1
/usr/bin/pkill -f conky >/dev/null 2>&1
/usr/bin/i3-msg restart >/dev/null 2>&1
/usr/bin/pasystray &
/usr/bin/caffeine &
/usr/bin/parcellite &
/usr/bin/nm-applet &
/usr/bin/conky -c ~/.config/conky/bar_conkyrc >/dev/null 2>&1 &

If I don't do the above restart, I eventually receive the following error from the i3pystatus IMAP module within 5-10 min after resuming from suspend:

Mail: socket error [Errno 32] Broken pipe

I don't have any info from .Xsession_error to provide since I've make that file immuatable as a workabout for lightdm's inability to filter content being written to it (.Xsession_error was constantly growing with GTK3 warnings after the recent upgrade to 3.14).

FYI: I last updated i3pystatus ~3 days ago and still experience the IMAP issue.

In any case, executing the above script has become a normal routine following a suspend, so I (almost) don't notice the IMAP issue anymore.

Cheers and thanks again from developing i3pystatus,

halocaridina

PS Forgot to mention that the conky I'm running is not sending its output to i3status bar, its being drawn to the root window,

from i3pystatus.

enkore avatar enkore commented on August 20, 2024

Thanks for the update :)

In theory it should start running in the next interval (default: 5 seconds) after the socket error exception is thrown...

To speed this process up you could try to set the default socket timeout explicitly to some low value (e.g. 2 seconds). See https://docs.python.org/3/library/socket.html#socket.setdefaulttimeout

from i3pystatus.

halocaridina avatar halocaridina commented on August 20, 2024

Hi enkore,

Thanks for the suggestion. Unfortunately, setting the timeout on the socket doesn't help. Only reloading the i3statusbar (as above) results in expected behavior (either when the broken pipe error is printed or when the indicator doesn't come up at all following a suspend and new mail is present in the INBOX).

Cheers,

halocaridina

from i3pystatus.

sileht avatar sileht commented on August 20, 2024

Perhaps #380 solves this issue.

Cheers,

from i3pystatus.

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.