Litt flaut det her glemte -t (--table).
Men en ./dump.py -t netbox gir f?lgende:
#roomid:ip:orgid:catid:[ro:serial:rw:function:subcat1:subcat2..]
Traceback (most recent call last):
File "./dump.py", line 258, in ?
main()
File "./dump.py", line 255, in main
handler()
File "./dump.py", line 69, in netbox
categories = box.getChildren(manage.Netboxcategory)
File "/usr/local/lib/python2.2/site-packages/forgetSQL.py", line 895, in getChildren
return forgetter.getAll(whereList, orderBy=orderBy)
File "/usr/local/lib/python2.2/site-packages/forgetSQL.py", line 763, in getAll
ids = cls.getAllIDs(where, orderBy=orderBy)
File "/usr/local/lib/python2.2/site-packages/forgetSQL.py", line 825, in getAllIDs
cls._sqlPrimary, orderBy=orderBy)
File "/usr/local/lib/python2.2/site-packages/forgetSQL.py", line 562, in _prepareSQL
raise """ERROR: No fields defined, cannot create SQL.
ERROR: No fields defined, cannot create SQL.
Maybe sqlPrimary is invalid?
Fields asked: ('id',)
My fields: {'category': 'netboxcategory.category', 'netbox': 'netboxcategory.netboxid'}
?vrige opsjoner virker fin; untall --all selvsagt pga. feilmeldingen over.
mvh
Odd Arne
-----Original Message-----
From: Stian S?iland [mailto:stain@itea.ntnu.no]
Sent: Mon 16-Aug-04 09:13
To: Hauge Odd Arne
Cc: nav-users(a)itea.ntnu.no
Subject: Re: dump.py
On 2004-08-16 09:01:23, Hauge Odd Arne wrote:
> Hei.
>
> F?r ikke dump.py til ? virke skikkelig. Har installert Optik, men n?r jeg kj?rer f.eks. python dump.py location
> You must select a valid table. Valid tables are:
> location
> netbox
> org
> prefix
> product
> room
> service
> subcat
> type
> usage
> vendor
>
> Jeg f?r dette resultatet uansett tabellnavn. Hva kan v?re galt ?
Pr?v:
./dump --help
Feilmeldingen er tydeligvis ikke spesifikk nok.. Du m? si:
./dump.py --table=location
eller
./dump.py -t location
Du har ogs? --all for ? dumpe alle tabellene.
Jeg har patchet dump.py til ? skrive ut hjelpen ved feil:
: stain@isbre ~/navme/subsystem/dbTools;./dump.py
usage: dump.py [options]
Dumps NAV database to importable files.
options:
-h, --help show this help message and exit
-sSEP, --seperator=SEP
use SEP to seperate fields in output, [default :]
-tTABLE, --table=TABLE
dump data from TABLE
-oFILE, --output=FILE
dump data to FILE instead of stdout
-a, --all dump all tables to files named TABLE.txt
ERROR: You must select a valid table. Valid tables are:
location netbox org prefix product room service subcat type usage vendor
: stain@isbre ~/navme/subsystem/dbTools;
--
Stian S?iland Men vi andre klarer ikke ? kalle
ITEA systemdrift, NTNU varmen tilbake i peisen. [Jagland]
orakel(a)ntnu.no
Tlf: 735 91500 =/\=