3,467 questions
Best practices
0
votes
0
replies
35
views
How to configure buildbot master to provide web access to files and directories on the server where master is running?
I have buildbot version 3.X configured the standard way: a master and multiple workers. A worker can build artifacts and then copy them to a directory on the server where the master is running using ...
Score of 1
1 answer
78 views
Error: ValueError: Unknown endpoint type: 'fd'
This morning, my production website went down with a "Bad Request" error. It was working the day before, and I made no changes that might have caused the error. Below is the traceback I ...
Score of 1
1 answer
45 views
Connecting to a device with a self signed certificate
I have a device with an SSL certificate and I want to pull data from it using twisted.web.client.Agent. The cert is self-signed, and expired. I can't modify the device to do anything about that.
I'm ...
Score of 4
2 answers
465 views
Using pytest-twisted functions with pytest-asyncio fixtures
I have code that uses Twisted so I've written a test function for it and decorated it with @pytest_twisted.ensureDeferred. The function awaits on some Deferreds. Then, I need to run some aiohttp ...
Score of 1
0 answers
64 views
Twisted Looping Call and While True
I am trying to combine two bits of code. The first is a simple Twisted looping call that runs once per minute. A simple scheduler type setup.
def minuteCheck():
# Do some stuff once a minute like ...
Score of 0
1 answer
38 views
twisted reactor not launching tasks on raspberry pi
I don't know why this code works on my windows computer, but just blocks on my raspberry pi.
from twisted.internet import reactor, ssl, threads
from autobahn.twisted.websocket import ...
Score of 3
2 answers
194 views
Unable to integrate asyncio and scrapy
I have this spider:
import logging
from scrapy import Spider, Request, settings
from dummy import settings
from dummy.items import DummyItem
LOGGER = logging.getLogger(__name__)
class DummySpider(...
Score of 1
1 answer
75 views
spider_closed signal not handled when interrupted
I've got a scrapy spider that I'm running in a different fashion than usual because I sometimes want to run the spider again after it finishes. Here's my code:
class LinkExtractorSpider(scrapy....
Score of 0
2 answers
192 views
How to send messages to an XMPP server using only Twisted?
I need to send messages to an XMPP server. Only send - I don't need to process replies, make a bot, or anything like that. When using the xmpppy module, it goes something like this:
from xmpp import ...
Score of 0
2 answers
87 views
How to rate limit a deferred HTTP client in Twisted?
I have an HTTP client written in Twisted that sends requests to an API of some site from a deferred. It goes something like this (somewhat simplified):
from json import loads
from core import output
...
Score of 0
1 answer
62 views
How to use startTLS in Twisted?
I want to establish a non-encrypted connection to a server and then, upon sending an agreed-upon command, to switch to a TLS-encrpted connection. It seems that Twisted's startTLS is meant exactly for ...
Score of -1
1 answer
115 views
Using Twisted to implement implicit FTPS server
I am writing an FTP server using the Python framework Twisted. Twisted has its own plain FTP implementation - but it doesn't support FTPS. I've noticed that most clients connect and immediately issue ...
Score of 0
2 answers
97 views
Issues when running http server with deferred threads under high load in twisted
I am having some issues related to the twisted http framework. Specifically, I am trying to implement the usage of threads.deferToThread with callbacks, to allow for better concurrency, which works ...
Score of 0
1 answer
204 views
Communicating with a Kafka server from a Python app using the Twisted framework
I have an app written using the Twisted framework, that communicates various data (mostly - log entries in JSON format) to a variety of logging servers using output plug-ins. I would like to make it ...
Score of 1
1 answer
214 views
Getting scrapy and pytest to work with AsyncioSelectorReactor
To reproduce my issue
python 3.12.1
scrapy 2.11.2
pytest 8.2.1
In bookspider.py I have:
from typing import Iterable
import scrapy
from scrapy.http import Request
class BookSpider(scrapy.Spider):
...