Closed terminalmage closed 4 years ago
Does this work for international data? I'm in canada and this commit stops my weather from being loaded. I updated because the status was always "None", but now I don't get anything.
Actually, testing the old code results in no weather either.
How can I help with this? I've had no success with enabling debug in this module as described in the pid file.
@howlett I do this:
# Adjust this logfile path as needed
status = Status(logfile='/home/erik/var/i3pystatus.log')
status.register(
'weather',
hints={'markup': 'pango'},
format='{condition} {current_temp}{temp_unit}[ {icon}][ Hi: {high_temp}][ Lo: {low_temp}][ {update_error}]',
colorize=True,
refresh_icon='<span color="' + COLOR_WORKING + '">⟳</span>',
log_level=logging.DEBUG,
backend=weathercom.Weathercom(
units='imperial',
location_code='whatever_you_use',
log_level=logging.DEBUG,
)
)
It also helps to run i3pystatus from a virtualenv, because it lets you install it using pip --editable /path/to/git/clone/of/i3pystatus
to make it easier to run i3pystatus while you are developing.
Sorry for any inconvenience, and I hope you're able to find the issue. Let me know if I can be of any further assistance.
@howlett The None
issue should be fixed in https://github.com/enkore/i3pystatus/pull/789. This also makes fixes to reflect yet another API change.
Thanks. I have tried to upgrad with "sudo pip3 install git+ https://github.com/enkore/i3pystatus.git --upgrade", but it seems I still get 3.35. Is this correct? I still get nothin but "() !" in the status bar after running the upgrade.
{~} $ python --version Python 2.7.18 {~} $ python3 --version Python 3.8.5 {~} $
Regards, Liam
On Thu, Aug 27, 2020 at 8:33 PM Erik Johnson notifications@github.com wrote:
@howlett https://github.com/howlett The None issue should be fixed in
789 https://github.com/enkore/i3pystatus/pull/789. This also makes
fixes to reflect yet another API change.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/enkore/i3pystatus/pull/788#issuecomment-682259152, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIMQKNH2WPEY2HG3LERMF3SC33PFANCNFSM4PN3VIBA .
3.35 is the last numbered release. Since then we just recommend installing from git (I'm going to be working on improving docs this week).
I personally don't use pip to install i3pystatus globally, I use a virtualenv.
virtualenv /path/to/my/virtualenvs/i3pystatus
pip install --editable /path/to/git/clone/of/i3pystatus
Then invoke your status script via the virtualenv's copy of the python binary, by setting the following in $HOME/.config/i3/config
status_command /path/to/my/virtualenvs/i3pystatus/bin/python /path/to/my/status_script.py
If you do this, updating is just as easy as pulling the git repo and then reloading i3.
Weather.com embeds the weather data as a JSON in a
<script>
tag, so this just updates to reflect recent changes to how that information is embedded.