after strugeling to get find a way on how to access the console I used this
method:
since I'm working on ubuntu web2py is located at /usr/share/web2py, however
if you start web2py with the desktop shortcut and you create an app it is
located in the ~/web2py/applications folder. so copied it over and tried to
run it, this didn't go smooth so I re-read the book again and found out you
can acces the shell through the webinterface by doing
127.0.0.1:8000/admin/shell/index/app.
so after inputting d = Kojn(key).charge(amount_in_fiat=100,currency='btc')
I get the same error:
In [2] : d = Kojn(key).charge(amount_in_fiat=100,currency='btc')
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/gluon/contrib/shell.py", line 233, in
run
exec compiled in statement_module.__dict__
File "<string>", line 1, in <module>
File "applications/kojncomm/models/kojn.py", line 46, in charge
return simplejson.loads(u.read())
File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 413,
in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 402,
in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 420,
in raw_decode
raise JSONDecodeError("No JSON object could be decoded", s, idx)
JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0)
Which if I'm correct means my error is due to koj.py trying to load json
and the response is not json encoded.
How do I change the line so it just shows me the receeived response?
On Monday, September 2, 2013 3:08:55 PM UTC+2, viniciusban wrote:
>
> On Mon, Sep 2, 2013 at 5:19 AM, Ivo <[email protected] <javascript:>>
> wrote:
> >
> >
> > I don't know how to see what the response is is I get.
>
> A simple way is using print. So your print will be in the console window.
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.