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

JSONException #3

Closed
Anvaarulhaq opened this issue Jan 15, 2020 · 1 comment
Closed

JSONException #3

Anvaarulhaq opened this issue Jan 15, 2020 · 1 comment

Comments

@Anvaarulhaq
Copy link

Every thing is working fine until I tried to get Weekly, Monthly or Yearly data its throwing an exception that says No value for date .
My Code is

    Horoscope hGemini = new Horoscope.Zodiac(MainActivity.this)
            .requestSunSign(SUNSIGN.GEMINI)
            .requestDuration(DURATION.WEEK)
            .showLoader(true)
            .isDebuggable(true)
            .fetchHoroscope();
    HorologyController cGemini = new HorologyController(new Response() {
        @Override
        public void onResponseObtained(Zodiac zodiac) {
            String horoscope = zodiac.getHoroscope();
            String sunsign = zodiac.getSunSign();
            String date = zodiac.getDate();
            Log.e("Horoscope", horoscope);
        }

        @Override
        public void onErrorObtained(String errormsg) {
        }
    });
    cGemini.requestConstellations(hGemini);

====>Log message is as bellow

W/System.err: org.json.JSONException: No value for date
W/System.err: at org.json.JSONObject.get(JSONObject.java:392)
at org.json.JSONObject.getString(JSONObject.java:553)
at bot.box.horology.hanshake.HorologyClient$HoroscopeTask.onPostExecute(HorologyClient.java:102)
at bot.box.horology.hanshake.HorologyClient$HoroscopeTask.onPostExecute(HorologyClient.java:41)
at android.os.AsyncTask.finish(AsyncTask.java:695)
at android.os.AsyncTask.access$600(AsyncTask.java:180)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:226)

@TheBotBox
Copy link
Owner

Resolved in

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

2 participants