Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/awesome/drawer/dateInfo.lua is broken #26

Open
landscape69 opened this issue Mar 6, 2016 · 5 comments
Open

/awesome/drawer/dateInfo.lua is broken #26

landscape69 opened this issue Mar 6, 2016 · 5 comments

Comments

@landscape69
Copy link

/awesome/drawer/dateInfo.lua seem to be broken i have checked and at line 59 it alltime cause a problem to get the correctly coordinate from system. its end up with crashing awesome on startup or empty calendar with weather

this function should be change a bit.

i dont knew how to do, but following should be somehow modify

--Weather stuff
local weatherInfo2=wibox.widget.textbox()

function updateWeater()
if dateModule.latitude ~= nil and dateModule.longitude ~= nil then
* local f=io.popen("curl -S 'http://api.openweathermap.org/data/2.5/weather?lat="..dateModule.latitude.."&lon="..dateModule.longitude.."'")*
local weatherInfo = nil
if f ~= nil then
local wData=json:decode(f:read("*all"))
f:close()
if wData ~= nil then
weatherInfo=" "..wData.name..", "..wData.sys.country.."\n"
weatherInfo=weatherInfo.." Temp: "..(wData.main.temp-273.15).." °C\n"
weatherInfo=weatherInfo.." Wind: "..(wData.wind.speed).." m/s\n"
weatherInfo=weatherInfo.." Humidity: "..(wData.main.humidity).." hPa"

      weatherInfo2:set_markup(weatherInfo or "N/A")
    else
      weatherInfo2:set_markup("N/A")
    end
  end
end

end

if i put precise ordinate with numbers latitude+longtitudethis function work.

@Elv13
Copy link
Owner

Elv13 commented Mar 6, 2016

@AxelTB Is that fixed in your version?

Anyhow, at this point I would rather disable features than fix them. The 2016 version is progressing well. And will be released along with Awesome 3.6. I could technically push it now, but I am still upstreaming content and there is major API breaking projects going on in Awesome (like screen plug&play without losing your tags and dynamic client layouts / tabs). On my side, most of my config is re-written (it look and behave mostly the same, just with less hacks). Some code was still from the 3.2 days (2008) and was badly outdated/broken/unmaintainable/deadcode.

@landscape69
Copy link
Author

@AxelTB version is also buggy here.

i am looking forward for the incoming update and rewritten configs. but as i see at the moment version 3.59 ist just released on today so version3.6 will take a couple time :)

@Elv13
Copy link
Owner

Elv13 commented Mar 6, 2016

If you can submit a pull request that fix the crash (even if it break the feature), I will merge it.

@landscape69
Copy link
Author

i cant programming so i cant effectively fix it. but i have set a fixed latitude and long titude ine the
line 53, of the file: /awesome/drawer/dateInfo.lua.

this the workaround which i have.

local f=io.popen("curl -S 'http://api.openweathermap.org/data/2.5/weather?lat=13.29&lon=52.5")

@AxelTB
Copy link
Contributor

AxelTB commented Mar 12, 2016

In my version i fixed it like this:

local f=io.popen("curl -S 'http://api.openweathermap.org/data/2.5/weather?lat="..dateModule.latitude.."&lon="..dateModule.longitude.."&appid=2de143494c0b295cca9337e1e96b00e0'")

Is in the commit c6d7b6472b74776f3c5e834dda113da47e662565

Edit: The fix is in https://github.com/AxelTB/drawer not in configs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants