Comments (3)
You can't pass a driver to a driver. Try this instead
service = services.Geckodriver(log_file=os.devnull)
async with get_session(service, Firefox()) as session:
from arsenic.
See this comment and this comment in the linked issue. the log_file
argument to a driver only controls the output of the driver, not of arsenic itself. arsenic uses structlog for logging, so you need to follow its instructions for controlling output.
from arsenic.
See this comment and this comment in the linked issue. the
log_file
argument to a driver only controls the output of the driver, not of arsenic itself. arsenic uses structlog for logging, so you need to follow its instructions for controlling output.
using construction like this:
service = services.Geckodriver(log_file=os.devnull)
async with get_session(Geckodriver(service), Firefox()) as session:
I receive this output:
Traceback (most recent call last):
File "all_in_one.py", line 325, in pushka
await parser()
File "all_in_one.py", line 371, in parser
async with get_session(Geckodriver(service), Firefox()) as session:
File "/usr/local/lib/python3.7/dist-packages/arsenic/__init__.py", line 16, in __aenter__
self.session = await start_session(self.service, self.browser, self.bind)
File "/usr/local/lib/python3.7/dist-packages/arsenic/__init__.py", line 28, in start_session
driver = await service.start()
File "/usr/local/lib/python3.7/dist-packages/arsenic/services.py", line 96, in start
self.log_file,
File "/usr/local/lib/python3.7/dist-packages/arsenic/services.py", line 34, in subprocess_based_service
process = await impl.start_process(cmd, log_file)
File "/usr/local/lib/python3.7/dist-packages/arsenic/subprocess.py", line 57, in start_process
*cmd, stdout=log_file, stderr=log_file, stdin=DEVNULL
File "/usr/lib/python3.7/asyncio/subprocess.py", line 217, in create_subprocess_exec
stderr=stderr, **kwds)
File "/usr/lib/python3.7/asyncio/base_events.py", line 1533, in subprocess_exec
bufsize, **kwargs)
File "/usr/lib/python3.7/asyncio/unix_events.py", line 190, in _make_subprocess_transport
**kwargs)
File "/usr/lib/python3.7/asyncio/base_subprocess.py", line 37, in __init__
stderr=stderr, bufsize=bufsize, **kwargs)
File "/usr/lib/python3.7/asyncio/unix_events.py", line 763, in _start
universal_newlines=False, bufsize=bufsize, **kwargs)
File "/usr/lib/python3.7/subprocess.py", line 728, in __init__
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
File "/usr/lib/python3.7/subprocess.py", line 1359, in _get_handles
c2pwrite = stdout.fileno()
AttributeError: 'Geckodriver' object has no attribute 'fileno'
from arsenic.
Related Issues (20)
- get_attribute("innerHTML") stopped working (chrome) HOT 3
- compatibility issue when asyncio loop policy is not the default one HOT 7
- Any way to controle several tabs async? HOT 2
- How to get page title? HOT 1
- arsenic doesnโt support all ChromeOptions? HOT 3
- Unable to open URLs with chrome driver at all? HOT 1
- Unable to set prefs in arsenic similar to selenium (download files to default directory)
- Any way to avoid close chrome after execution HOT 4
- How does this compare to playwright? HOT 1
- AttributeError: 'str' object has no attribute 'fileno' HOT 1
- Spawning Chrome/Edge browser in Windows from WSL2
- Asyncio TimeoutError HOT 1
- Unable to run tests because of broken dependency
- Post-merge CI build fails HOT 2
- Shall we try goodfirstissue.dev ?
- Getting 'unknown error: net::ERR_CONNECTION_CLOSED' Error HOT 4
- Cloudflare detection HOT 1
- No requirements.txt file and couldn't run the tests with Pytest HOT 5
- FileNotFoundError: [WinError 2] The system cannot find the file specified HOT 5
- Remove distutils HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arsenic.