Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error scraping images FileNotFoundError: [Errno 2] No such file or directory: 'outputs/USERNAME ... pandas dataframe is not found #149

Open
richlysakowski opened this issue Dec 2, 2022 · 0 comments

Comments

@richlysakowski
Copy link

On Windows 10:

pandas dataframe file is not found (is never written out) after the path is constructed from the command arguments list.

DevTools listening on ws://127.0.0.1:61284/devtools/browser/a130e9c4-e6a2-41dd-adbf-74a0c60b1363
Traceback (most recent call last):
File "", line 1, in
File "c:\Users\PowerUser\Desktop\00_Selenium_Automation\TwitterScweet\Scweet\scweet.py", line 74, in scrape
since = str(get_last_date_from_csv(path))[:10]
File "c:\Users\PowerUser\Desktop\00_Selenium_Automation\TwitterScweet\Scweet\utils.py", line 230, in get_last_date_from_csv
df = pd.read_csv(path)
File "C:\ProgramData\Anaconda3\envs\core\lib\site-packages\pandas\util_decorators.py", line 211, in wrapper
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\envs\core\lib\site-packages\pandas\util_decorators.py", line 331, in wrapper
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\envs\core\lib\site-packages\pandas\io\parsers\readers.py", line 950, in read_csv
return _read(filepath_or_buffer, kwds)
File "C:\ProgramData\Anaconda3\envs\core\lib\site-packages\pandas\io\parsers\readers.py", line 605, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "C:\ProgramData\Anaconda3\envs\core\lib\site-packages\pandas\io\parsers\readers.py", line 1442, in init
self._engine = self._make_engine(f, self.engine)
File "C:\ProgramData\Anaconda3\envs\core\lib\site-packages\pandas\io\parsers\readers.py", line 1735, in _make_engine
self.handles = get_handle(
File "C:\ProgramData\Anaconda3\envs\core\lib\site-packages\pandas\io\common.py", line 856, in get_handle
handle = open(
FileNotFoundError: [Errno 2] No such file or directory: 'outputs/USERNAME_2022-11-07_2022-12-02.csv'

data = scrape(hashtag="bitcoin", since="2022-11-07", until=None, from_account = "USERNAME", interval=1, headless=True, display_type="Top", save_images=True, resume=True, filter_replies=True, proximity=True)

USERNAME was substituted for the actual from_account="USERNAME" value.

I am debugging now. I will report back if I can fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant