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

exporting a csv file #3

Open
rawlingsj opened this issue Nov 15, 2022 · 0 comments
Open

exporting a csv file #3

rawlingsj opened this issue Nov 15, 2022 · 0 comments

Comments

@rawlingsj
Copy link

I was looking at creating a bit of automation which created issues or pull requests to update packages in a git repository.

I came across this repo, not sure if my use case is an intended one so any other suggestions are welcome.

I was thinking about generating the csv file, parsing it, matching packages I'm interested in and creating related issues or PRs. So I created a temp DB + user, imported the latest sql dump from https://dumps.repology.org/ which seemed to work albeit with two errors:

ERROR:  operator class "public.gin_trgm_ops" does not exist for access method "gin"
ERROR:  operator class "public.gin_trgm_ops" does not exist for access method "gin"

Everything else seemed to import fine.

I then added the dependencies for repology-exports, and ran

~/repology-exports $ make flake8
flake8 repology-export.py repologyexport/exports
~/repology-exports $ make mypy
mypy repology-export.py repologyexport/exports
Success: no issues found in 2 source files

next

mkdir foo
./repology-export.py --target-dir foo

I then got an error

~/repology-exports $ ./repology-export.py --target-dir foo
Exporting wikidata.csv to foo/wikidata.csv
Traceback (most recent call last):
  File "/home/postgres/repology-exports/./repology-export.py", line 67, in <module>
    sys.exit(main())
  File "/home/postgres/repology-exports/./repology-export.py", line 57, in main
    export.run(db, outfd)
  File "/home/postgres/repology-exports/repologyexport/exports/wikidata.py", line 34, in run
    cur.execute(
psycopg2.errors.UndefinedColumn: column "extrafields" does not exist
LINE 4:                     extrafields->>'entity'
                            ^

Do the steps I took seem right?
Any ideas what could be causing the error?
Is this a good use case or is there a better approach?
Thanks.

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