http post requests
-
@jcaron i add this ''' for comment but it still be the same output .My problem is for the urequest module because i don't know exactly how to write a'' post request '' using this module,this is the error i get:
'''
Traceback (most recent call last):
File "<stdin>", line 74, in <module>
File "<stdin>", line 50, in post_location
File "/flash/lib/urequests.py", line 115, in post
File "/flash/lib/urequests.py", line 53, in request
TypeError: function takes 2 positional arguments but 4 were given
''' -
The source quotation char is not the apostophe ' 0x27
It is the dead accent key ` 0x60 -
@oglucio can you show line 53 of your
/flash/lib/urequests.pyfile? I think to remember having seen somewhere that there's a change to make in a call somewhere for compatibility. Search fo urequests in the forum, you'll probably find a hint on that. -
@jcaron
#line53 and 54
ai = usocket.getaddrinfo(host, port, 0, usocket.SOCK_STREAM)
ai = ai[0] -
@jcaron all links that referred to urequest.py resolved on all the forum are no longer available.
-
@crumble i am using the qwerty [ita] i don't found it .Can you help me?
-
@oglucio said in http post requests:
@crumble i am using the qwerty [ita] i don't found it .Can you help me?
please use a civilised language like german or US english ;)
But even we can learn something. You have those strange french letters on your keyboard and therefore no special key to compose them. interesting. I have to pay more attention when I am in the alps.
you can switch to US layout and use the key left to the 1-key. Or use copy&paste.
But god news for you. Pycom updated the forum a few days ago. Now I see that we have a button for marking code. Use the </> button. And they gave us not only one ordinary button. No - we got two. So you can choose between the auto text ;)
-
@oglucio searched for "urequest arguments" and found this in 2 clicks:
https://forum.pycom.io/topic/3017/sending-sensor-data-to-server-using-lora/6
-
@jcaron still getting the same error
-
@oglucio it would be difficult to get the same error if you applied the fix given in that post.
Can you post the error and the corresponding line of your code?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login