facebookresearch / facebookresearch/Ad-Library-API-Script-Repository

PermissionError: [Errno 13] Permission denied:

Offen
#51 6 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
337
Forks
130
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.