SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#76 2013-01-16 02:21:58

jed
#! CrunchBanger
From: Detachment 7
Registered: 2012-08-28
Posts: 200
Website

Re: arclances conky weather script - v6.2.1

Hey arclance, long time no need of help!!!  Till now that is...

A few months ago, I stopped drinking the orange kool-aid and switched to Sid (VSIDO by VastOne!).  I'm getting an error I'll post below.  Any ideas?  I've installed lua5.1 and 5.2.  Shouldn't the be in /usr/local/share?  Says 'json' not found:  (following is the output from terminal...

jed@jedsdesk:~$ conky -c ~/conky/arclance/conkyrc_conkyWeather_arclance &
[1] 16545
jed@jedsdesk:~$ Conky: llua_load: ...ome/jed/conky/arclance/lua/conkyWeather_arclance.lua:135: module 'json' not found:
	no field package.preload['json']
	no file './json.lua'
	no file '/usr/local/share/lua/5.1/json.lua'
	no file '/usr/local/share/lua/5.1/json/init.lua'
	no file '/usr/local/lib/lua/5.1/json.lua'
	no file '/usr/local/lib/lua/5.1/json/init.lua'
	no file '/usr/share/lua/5.1/json.lua'
	no file '/usr/share/lua/5.1/json/init.lua'
	no file '/usr/lib/conky/libjson.so'
	no file './json.so'
	no file '/usr/local/lib/lua/5.1/json.so'
	no file '/usr/lib/x86_64-linux-gnu/lua/5.1/json.so'
	no file '/usr/lib/lua/5.1/json.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
Conky: desktop window (1000003) is subwindow of root window (b8)
Conky: window type - normal
Conky: drawing to created window (0x1600001)
Conky: drawing to double buffer
Conky: llua_do_call: function conky_main execution failed: attempt to call a nil value

No hurry as I'm still playing at trying to figure it out myself!  I've learned so much from yours and a couple of others (mrpeachy, Teo, VastOne, and Sector11) scripts, that my thanks would be insufficient by comparison.  The knoweledge you guys have when it comes to things Linux is mind boggling to me!  You've probably forgotten more about it than I'll ever be able to learn!  Thanks for everything, past and present....

Jed


Proud user of VSDIO: Jedi!  You can download it from here...  I'm on  the web at NixNut.com!

Offline

Be excellent to each other!

#77 2013-01-16 02:28:41

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: arclances conky weather script - v6.2.1

Do you have the "lua-json" package installed?
That is where "json.lua" comes from.

Offline

#78 2013-01-16 02:34:13

jed
#! CrunchBanger
From: Detachment 7
Registered: 2012-08-28
Posts: 200
Website

Re: arclances conky weather script - v6.2.1

arclance wrote:

Do you have the "lua-json" package installed?
That is where "json.lua" comes from.

Arclance, that is entirely too fast of a response!!  I probably do not.  I'm an idiot!!!
Of course I didn't.  Now I do.  And of course it works perfectly.  Another embarrassing moment for Jed!   :8

Thank-you sir.  Much appreciated....


Proud user of VSDIO: Jedi!  You can download it from here...  I'm on  the web at NixNut.com!

Offline

#79 2013-01-16 05:05:36

jed
#! CrunchBanger
From: Detachment 7
Registered: 2012-08-28
Posts: 200
Website

Re: arclances conky weather script - v6.2.1

OK, more stupidity on my part I guess.  It isn't updating.  API key and location stuff is correct.  xdotool and libxdo2 are the latest on my install....  Conky version 1.9.0

Not sure at this point what I'm doing wrong.  Not getting any errors in terminal just says that its using backup on the weather display.  The backup is from Oct.  Says Conn Failure R


Proud user of VSDIO: Jedi!  You can download it from here...  I'm on  the web at NixNut.com!

Offline

#80 2013-01-16 05:08:37

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: arclances conky weather script - v6.2.1

Is the python script producing any errors?
Are you sure that you have the python script set to output in the same place you are reading files from with the lua script?

Offline

#81 2013-01-16 05:13:31

jed
#! CrunchBanger
From: Detachment 7
Registered: 2012-08-28
Posts: 200
Website

Re: arclances conky weather script - v6.2.1

arclance wrote:

Is the python script producing any errors?
Are you sure that you have the python script set to output in the same place you are reading files from with the lua script?

ahhh shite, i have to load the python script first dont i before i run the conky?


Proud user of VSDIO: Jedi!  You can download it from here...  I'm on  the web at NixNut.com!

Offline

#82 2013-01-16 05:16:30

jed
#! CrunchBanger
From: Detachment 7
Registered: 2012-08-28
Posts: 200
Website

Re: arclances conky weather script - v6.2.1

been a while since i used this


Proud user of VSDIO: Jedi!  You can download it from here...  I'm on  the web at NixNut.com!

Offline

#83 2013-01-16 05:18:16

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: arclances conky weather script - v6.2.1

Yes the python script does the updates so conky does not freeze for 60 seconds every time the weather updates.
Python also has much better error handling than Lua which makes the code easier to write.

Offline

#84 2013-01-16 05:20:01

jed
#! CrunchBanger
From: Detachment 7
Registered: 2012-08-28
Posts: 200
Website

Re: arclances conky weather script - v6.2.1

jed wrote:

been a while since i used this

I got it buddy.  Sorry to keep bothering you...
Thanks for your patience!  Your awesome!  Thanks a bunch....

Last edited by jed (2013-01-16 05:26:36)


Proud user of VSDIO: Jedi!  You can download it from here...  I'm on  the web at NixNut.com!

Offline

#85 2013-01-16 06:31:45

jed
#! CrunchBanger
From: Detachment 7
Registered: 2012-08-28
Posts: 200
Website

Re: arclances conky weather script - v6.2.1

Everything is perfect.  Thank-you for being so fast to reply!  One more question.  Can I remove the radar and sat images?

Thanks...


Proud user of VSDIO: Jedi!  You can download it from here...  I'm on  the web at NixNut.com!

Offline

#86 2013-01-16 14:53:13

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: arclances conky weather script - v6.2.1

Yes at least the ones in the main view can be removed.
You can do that by changing line 416 from

		cr,blx,bly = drawRad_Sat_Small(cr, blx, bly, localx, localy)

to

		--cr,blx,bly = drawRad_Sat_Small(cr, blx, bly, localx, localy)

It will still download them but they won't be displayed.

Offline

#87 2013-01-16 23:07:35

jed
#! CrunchBanger
From: Detachment 7
Registered: 2012-08-28
Posts: 200
Website

Re: arclances conky weather script - v6.2.1

arclance wrote:

Yes at least the ones in the main view can be removed.
You can do that by changing line 416 from

		cr,blx,bly = drawRad_Sat_Small(cr, blx, bly, localx, localy)

to

		--cr,blx,bly = drawRad_Sat_Small(cr, blx, bly, localx, localy)

It will still download them but they won't be displayed.

Yes sir!  Thats exactly the look I was going for!!!  Thanks for the quick help.  Thanks also for your weather script!!!  It is totally awesome in case I haven't told you before!!!


Proud user of VSDIO: Jedi!  You can download it from here...  I'm on  the web at NixNut.com!

Offline

#88 2014-07-05 15:15:55

batman51
Member
Registered: 2014-06-29
Posts: 14

Re: arclances conky weather script - v6.2.1

I am baffled and perplexed as to why the weather conky that I downloaded is not working.I keep getting a "No File or Directory"error and I have doubled-checked everything, but there must be something I missed. The error is

using cPickle
conkyWeather_arclance_v6.2
installLocation = ~/conkyWeather_arclance_v6.2.1_2012-09-26
no pull yet
Traceback (most recent call last):
  File "/home/xxx/conkyWeather_arclance_v6.2.1_2012-09-26/conkyWeather_arclance_v6.2.py", line 1016, in <module>
    conkyWeather()
  File "/home/xxx/conkyWeather_arclance_v6.2.1_2012-09-26/conkyWeather_arclance_v6.2.py", line 262, in conkyWeather
    lastPullBackup = open(logDirectory + "/lastPullBackup.txt", "r") # file for keeping local copy of weather information incase of program/internet errors and to keep track of lastPull if the program is stopped
IOError: [Errno 2] No such file or directory: '~/conkyWeather_arclance_v6.2.1_2012-09-26/log/lastPullBackup.txt'

lastPullBackup.txt is in 'log' and 'log' is in conkyWeather_arclance_v6.2.1_2012-09-26. I am puzzled as to the program's lack of cooperation. Any help would be appreciated, thank you,bob

Offline

#89 2014-07-05 15:36:22

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: arclances conky weather script - v6.2.1

You have a "~" in you installLocation.

batman51 wrote:
installLocation = ~/conkyWeather_arclance_v6.2.1_2012-09-26

please use the full path location without one instead like this

installLocation = "/home/xxx" + "/conkyWeather_arclance_v6.2.1_2012-09-26"

making sure to replace the "xxx" with your username and see if that helps.

Last edited by arclance (2014-07-05 15:41:33)

Offline

#90 2014-07-05 16:02:00

batman51
Member
Registered: 2014-06-29
Posts: 14

Re: arclances conky weather script - v6.2.1

That was it! smile Now I have an invalid conky config error that yells for attention. Will read through other posts before I bother you again.Thank you very much

Offline

#91 2014-07-07 16:33:06

batman51
Member
Registered: 2014-06-29
Posts: 14

Re: arclances conky weather script - v6.2.1

I'm not familiar with programming so please forgive my ignorance and foolish errors. when I try to run the conky, I get the following message:

Conky: llua_load: /usr/share/lua/5.1/json/decode/strings.lua:102: loop body may accept empty string
Conky: desktop window (120002d) is subwindow of root window (2bb)
Conky: window type - normal
Conky: drawing to created window (0x3400001)
Conky: drawing to double buffer
Conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_start_xdotool execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_main execution failed: 

can you shine some light in my direction so I won't be kept in the dark?thank you again

Offline

#92 2014-07-07 17:03:22

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: arclances conky weather script - v6.2.1

@batman51

I think you need to post your conkyrc. It looks like it may be another path error.

(I went through an excrutiating help session with someone else recently - every difficulty he had with the conky/lua that he had downloaded was because a) he didn't understand paths b) he couldn't see his typos. Just sayin wink smile )


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#93 2014-07-07 18:10:34

batman51
Member
Registered: 2014-06-29
Posts: 14

Re: arclances conky weather script - v6.2.1

heres my .conkyrc:

#####
# conky configuration for conkyWeather_arclance_lua_v6.2.1 by arclance
# displays weather data and images
#####
### Position ###
alignment bottom_left
gap_x 622
gap_y 31
minimum_size 1057 270
maximum_width 1057
### End Position ###

### Borders ###
border_inner_margin 0
border_outer_margin 0
border_width 0
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
### End Borders ###

### Window ###
own_window yes
own_window_transparent yes
#own_window_argb_visual false
#own_window_argb_value 0
own_window_class conky
own_window_type normal
own_window_title weatherConky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
### End Window ###

### Color ###
default_color CC9900
default_outline_color 000000
default_shade_color 8B0000
color0 EE7600
color1 8B0000
### End Color ###

### Font ###
use_xft yes
xftfont DejaVu Sans Mono:size=10
xftalpha 1
override_utf8_locale yes
uppercase no
### End Font ###

### Conky Settings ###
double_buffer yes
background no
update_interval 1
total_run_times 0
no_buffers yes
use_spacer none
cpu_avg_samples 1
net_avg_samples 1
imlib_cache_size 0
### End Conky Settings ###

### Lua ###
lua_load /home/bob/conkyWeather_arclance_v6.2.1_2012-09-26/lua/conkyWeather_arclance.lua
lua_draw_hook_pre main
lua_startup_hook start_xdotool
lua_shutdown_hook stop_xdotool
### End Lua ###

TEXT

thanks again
Remember Bob's Prayer: May the words I speak today be soft and tender, for tomorrow I may have to eat them.

Offline

#94 2014-07-07 18:40:46

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: arclances conky weather script - v6.2.1

Did you edit the paths, and do the other setup steps as described in the README?


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#95 2014-07-07 18:59:50

batman51
Member
Registered: 2014-06-29
Posts: 14

Re: arclances conky weather script - v6.2.1

I believe so, but I must have erred somewhere or forgot to install a package somewhere. But I see what you mean it is probably a BECAK error(BEtween Keyboard And Chair) roll

Offline

#96 2014-07-07 19:19:12

batman51
Member
Registered: 2014-06-29
Posts: 14

Re: arclances conky weather script - v6.2.1

upon examination found an error in my  lua but the xdotool seems to not want to start

bob@slick ~ $ conky -c ~/conkyWeather_arclance_v6.2.1_2012-09-26/conkyrc_conkyWeather_arclance
Conky: llua_load: /usr/share/lua/5.1/json/decode/strings.lua:102: loop body may accept empty string
Conky: desktop window (120002d) is subwindow of root window (2bb)
Conky: window type - normal
Conky: drawing to created window (0x3c00001)
Conky: drawing to double buffer
Conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_start_xdotool execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_main execution failed: attem

elment
I have xdotool installed, I  checked. Is a puzzlement neutral

Offline

#97 2014-07-07 19:34:57

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: arclances conky weather script - v6.2.1

But before that is

Conky: llua_do_call: function conky_main execution failed: attempt to call a nil value

I still think it is a typo/path error somewhere, but google the error messages - one possible solution here


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#98 2014-07-07 20:51:32

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: arclances conky weather script - v6.2.1

damo wrote:

But before that is

Conky: llua_do_call: function conky_main execution failed: attempt to call a nil value

I still think it is a typo/path error somewhere, but google the error messages - one possible solution here

No the problem is from this line

batman51 wrote:
Conky: llua_load: /usr/share/lua/5.1/json/decode/strings.lua:102: loop body may accept empty string

which happens at the beginning of the script when it tries to load the lua-json lua module which fails due to a problem with the lua-json package in Debian which appears to have migrated to stable without being fixed.

This error and the others like it happen when the conky tries to run the lua code which failed to compile due to the import error.

Conky: llua_do_call: function conky_main execution failed: attempt to call a nil value

There is a more recent version of the package (1.3.1-1) in testing and unstable but I don't know if it will help or not.
There is another way to install lua-json which I know works, I can explain that when I get home and can check my notes on it.

Last edited by arclance (2014-07-07 20:52:28)

Offline

#99 2014-07-07 22:23:05

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: arclances conky weather script - v6.2.1

^Fortunately there is a specialist in da house big_smile


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

Help fund CrunchBang, donate to the project!

#100 2014-07-07 22:54:09

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: arclances conky weather script - v6.2.1

The problem is that Debian updated lua-lpeg to v0.12 but lua-json (before v1.3.2) is incompatible with lua-lpeg v0.12.
Debian needs to update their lua-json package with a patch or to v1.3.2 or higher to fix the problem.
lua-json from the Debian package will not load until they do this.

Until they do that you have to build lua-json and lua-lpeg yourself to use them.
Fortunately LuaRocks, a program to install (and build if necessary) Lua modules can do that for you.

Debian has a LuaRocks package you can install with this command.

sudo apt-get install luarocks

Then you need to remove the Debian lua-json and lua-lpeg packages with this command.

sudo apt-get purge lua-json lua-lpeg

Finally you can install lua-json and lua-lpeg with LuaRocks using this command.

sudo luarocks install luajson

lua-json depends on lua-lpeg so LuaRocks will install them both with that command.

I don't know if anything LuaRocks will install for this will need complied (I have not done this is a while) but if it does you might get an error message if you don't have the needed compiler installed.
Post any errors you get and I will try to help you with them.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo