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

Bug: "Cannot save file into a non-existent directory: 'ghrs-data'" #86

Open
olets opened this issue Jan 12, 2024 · 1 comment
Open

Bug: "Cannot save file into a non-existent directory: 'ghrs-data'" #86

olets opened this issue Jan 12, 2024 · 1 comment

Comments

@olets
Copy link
Contributor

olets commented Jan 12, 2024

I'm getting the following error:

# ---snip---
240111-23:31:30.123 INFO:MainThread: write fork time series to forks-raw.csv.tmp, then rename to forks-raw.csv
240111-23:31:30.124 INFO:MainThread: current stargazer count as reported by repo properties: 1
240111-23:31:30.124 INFO:MainThread: does not exist yet: ghrs-data/stargazer-snapshots.csv
240111-23:31:30.124 INFO:MainThread: write cumulative/snapshot-based stargazer time series to ghrs-data/stargazer-snapshots.csv.tmp, then rename to ghrs-data/stargazer-snapshots.csv
Traceback (most recent call last):
  File "//fetch.py", line 596, in <module>
    main()
  File "//fetch.py", line 114, in main
    fetch_and_write_stargazer_ts(repo, args)
  File "//fetch.py", line 199, in fetch_and_write_stargazer_ts
    updated_sdf.to_csv(tmppath, index_label="time_iso[86](https://github.com/SNIP/actions/runs/SNIP/job/SNIP#step:3:87)01")
  File "/usr/local/lib/python3.10/site-packages/pandas/core/generic.py", line 3[90](https://github.com/SNIP/actions/runs/SNIP/job/SNIP#step:3:91)2, in to_csv
    return DataFrameRenderer(formatter).to_csv(
  File "/usr/local/lib/python3.10/site-packages/pandas/io/formats/format.py", line 1152, in to_csv
    csv_formatter.save()
  File "/usr/local/lib/python3.10/site-packages/pandas/io/formats/csvs.py", line 247, in save
    with get_handle(
  File "/usr/local/lib/python3.10/site-packages/pandas/io/common.py", line 739, in get_handle
    check_parent_directory(str(handle))
  File "/usr/local/lib/python3.10/site-packages/pandas/io/common.py", line 604, in check_parent_directory
    raise OSError(rf"Cannot save file into a non-existent directory: '{parent}'")
OSError: Cannot save file into a non-existent directory: 'ghrs-data'
+ FETCH_ECODE=1
+ set +x
error: fetch.py returned with code 1 -- exit.

One possible complicating factor is the repo is only two days old. If I remember correctly we've seen before that there may be weirdnesses with young repos, where Github isn't storing data yet.

I haven't looked into the source, but the error reads to me like this isn't a GitHub problem.

Can email you a short-lifespan token if you want to experiment.

@olets
Copy link
Contributor Author

olets commented Jan 13, 2024

Workflow did succeed after I manually created, committed, and pushed path/to/ghrs-data/.gitkeep.

This is using jgehrcke/github-repo-stats@HEAD (so that I can have #75 without waiting on a release)

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