g0v / api.ly

api.ly.g0v.tw - ly api endpoint
14 stars 6 forks source link

getting error while init the project #49

Closed chilijung closed 10 years ago

chilijung commented 10 years ago

I've follow the instructions in https://github.com/g0v/api.ly#init

after enter curl https://dl.dropboxusercontent.com/u/30657009/ly/api.ly.bz2 | bzcat | psql ly -f -, I've got error message below. Seems like I haven't create the tables. Do anything missed in README? Or I've missed something?

Thanks.

...

psql:<stdin>:670: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:671: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:672: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:673: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:674: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:675: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:676: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:677: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:678: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
  7 8692k    7  623k    0     0  51158      0  0:02:53  0:00:12  0:02:41 63825psql:<stdin>:679: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:680: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:681: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:682: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:683: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:684: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:685: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:686: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:687: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:688: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:689: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:690: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:691: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:692: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:693: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:694: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:695: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:696: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:697: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:698: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:699: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:700: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:701: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:702: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:703: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:704: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:705: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:706: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:707: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:708: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:709: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:710: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:711: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:712: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:713: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:714: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:715: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:716: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:717: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:718: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:719: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:720: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:721: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:722: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:723: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:724: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:725: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:726: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:727: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:728: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:729: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:730: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:731: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:732: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:733: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:734: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:735: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:736: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:737: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:738: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:739: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:740: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:741: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:742: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:743: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:744: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:745: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:746: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:747: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:748: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:749: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:750: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
                    ^
psql:<stdin>:751: ERROR:  relation "bills" does not exist
LINE 1: INSERT INTO bills (bill_id, bill_ref, summary, proposed_by, ...
clkao commented 10 years ago

did you do lsc app.ls --boot before loading the schema?

chilijung commented 10 years ago

After I enter lsc app.ls --boot I got

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: FATAL:  database "--boot" does not exist

    at Connection.<anonymous> (/Users/lijung/Documents/g0v/api.ly/node_modules/pgrest/node_modules/plv8x/node_modules/pg/lib/native/index.js:202:17)
    at Connection.EventEmitter.emit (events.js:95:17)

but I can serve by entering lsc app.ls ly,

info: Available collections:
amendments bills calendar ivod laws motions sittings ttsbills ttsinterpellation ttsmotions
info: Serving `ly` on http://127.0.0.1:3000/collections

but there is no data in the tables

clkao commented 10 years ago

it should be lsc app.ls ly --boot which initialize the tables, it's like lsc app.ls ly except it doesn't run the server.

try to load data again after that.

chilijung commented 10 years ago

Thanks for helping, but I still have no luck...

$ lsc app.ls ly --boot
$ curl https://dl.dropboxusercontent.com/u/30657009/ly/api.ly.bz2 | bzcat | psql ly -f -

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0 8692k    0 65134    0     0  21007      0  0:07:03  0:00:03  0:07:00 21004SET
SET
SET
SET
SET
SET
psql:<stdin>:17: ERROR:  column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
                                                             ^
psql:<stdin>:18: ERROR:  column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
                                                             ^
psql:<stdin>:19: ERROR:  column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
                                                             ^
psql:<stdin>:20: ERROR:  column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
                                                             ^
psql:<stdin>:21: ERROR:  column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
                                                             ^
psql:<stdin>:22: ERROR:  column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
                                                             ^
psql:<stdin>:23: ERROR:  column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
                                                             ^
psql:<stdin>:24: ERROR:  column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
                                                             ^
psql:

...
...
...
clkao commented 10 years ago

The dump needs upating. Will fix later today

clkao commented 10 years ago

@chilijung can you try again? the dump has been updated

chilijung commented 10 years ago

@clkao ++ success!!!!