i could be totally wrong, and please correct me if i am, but try this:
target: this will give you a current twisted / python installation and
keep the packages seperate from the system ones
# 1. install a package called virtualenv and pip on your system
apt install virtualenv pip
# 2. create a
Am Montag, den 20.02.2017, 18:16 -0800 schrieb Glyph Lefkowitz:
> > On Feb 20, 2017, at 5:02 AM, steven meiers
> > wrote:
> >
> > any idea why this does not work?
>
> Most likely you are being bitten by the recent change to not add '.'
> to sys.path a
hi,
up to now ive only used the python unittest for my code, but now i
would also like to test the twisted part.
so i followed:
http://twistedmatrix.com/documents/current/core/howto/trial.html
but i get this error:
(venv) julius@t560:~/code/python/twisted/basics$ trial calculus
calculus
...
>
> [SNIP]
>
> The “Unhanded error in Deferred” isn’t coming from your call to
> deferToThread, it is coming from your task.LoopingCall. When you
> invoke .start() on your LoopingCall instance, it returns a Deferred,
> which fires its assigned callback handler when you call .stop() on
> the Loo
> Sorry, your code example and your explanation don’t make clear what
> you expect to happen, and when. When you say “the first method that
> is called from my code”, are you referring to aSillyBlockingMethod,
> or runEverySecond? In the deferToThread case, you are calling the
> former; in the
hi,
there is a abvious error in the code at the end.
since i know next to nothing about threads i thought maybe a print
statement in the code that is actually doing the work would give me
some pointers.
if im not mistaken, it is:
def callWithContext in python/context.py
as it turns out it does
hi,
this websocket code works but now i would like to be able to import it
to another class to have a way to send messages without waiting for the
answer.
the code is below here and also pasted here: https://bpaste.net/show/78
36ba3b8008 for some nice syntax highlighting.
just running websock
Am Montag, den 09.01.2017, 23:12 -0800 schrieb Glyph Lefkowitz:
>
>
> > On Jan 9, 2017, at 5:20 PM, steven meiers
> > wrote:
> >
> > the error does come up when you give agent.request a "GET" instead
> > of a
> > b"GET".
>
Am Montag, den 09.01.2017, 23:12 -0800 schrieb Glyph Lefkowitz:
>
>
> > On Jan 9, 2017, at 5:20 PM, steven meiers
> > wrote:
> >
> > the error does come up when you give agent.request a "GET" instead
> > of a
> > b"GET".
>
hi,
i use twisted to send a web request over a proxy, this works over
treq.get(url, agent=myagent) without problems.
but in the process (started out with agent.request) i could not figure
out from what line of twisted code this error:
[Failure instance: Traceback (failure with no frames): :
[]
thanks for the quick replys guys, you were right. a .encode('utf-8')
helps.
actually the json.dumps part in the code is wrong.
it has to be:
somepage = yield treq.post(target_url, body.encode('utf-8'),
headers=headers, cookies=cookies )
Am Samstag, den 07.01.2017, 12:00 + schrieb Cory Ben
hi,
sending a simple post request with a body (cookies) results in a error
here.
im using python 3.x with the latest twisted and treq installed via pip
in a virtualenv.
the code gets a chatroom login page, extracts two values, gets the
cookies and logs a user into the chat. (incomplete)
thing
hi,
sending a simple post request with a body (cookies) results in a error
here.
im using python 3.x with the latest twisted and treq installed via pip
in a virtualenv.
the code gets a chatroom login page, extracts two values, gets the
cookies and logs a user into the chat. (incomplete)
thing
13 matches
Mail list logo