PermissionError: [Errno 13] Permission denied:
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with python/fb_ads_library_api_operators.py at save_to_csv and the open(output_file, "w") call, then trace how python/fb_ads_library_api_cli.py passes the output filename from the reported command. Reproduce the command on Windows and determine why a subsequent dataset cannot open the CSV; done means repeated saves complete without PermissionError.
Written by the indexing model from the issue text.
Description
Hello,
I am running this command on my terminal :
C:\Ad-Library-API-Script-Repository-main\python> py fb_ads_library_api_cli.py -t (token) -f "id,page_id,page_name,ad_creative_bodies,spend,demographic_distribution,bylines,ad_delivery_start_time" -c "CA" -s "climate" --after-date "2024-05-01" save_to_csv file.csv
And I get the following error :
Traceback (most recent call last):
File "C:\Ad-Library-API-Script-Repository-main\python\fb_ads_library_api_cli.py", line 147, in
main()
File "C:\Ad-Library-API-Script-Repository-main\python\fb_ads_library_api_cli.py", line 134, in main
save_to_csv(
File "C:\Ad-Library-API-Script-Repository-main\python\fb_ads_library_api_operators.py", line 96, in save_to_csv
with open(output_file, "w") as csvfile:
^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied.
I have tried adding "encoding="utf-8" in the fb_ads_library_api_operators file, but it didn't work (i am able to get one dataset then i get the same error all over again)
Does anyone have a solution ? i'm not sure I understand how the Permission system works in the Graph Api.
- Dominant language
- Python
- Stars
- 338
- Forks
- 131
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from facebookresearch/Ad-Library-API-Script-Repository
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
facebookresearch/Ad-Library-API-Script-Repository#62 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
facebookresearch/Ad-Library-API-Script-Repository#50 · 5 comments · 4 reactions ·
All issues in facebookresearch/Ad-Library-API-Script-Repository
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100