Noticies i articles

Version 0.2 of loadcsv released

A new release of the utility loadcsv, the first one updated to freshmeat.

Tags: , ,

3 Responses to “Version 0.2 of loadcsv released”

  1. Tom Brander Says:

    Found yo and loadcsv on Pipy About to give it a go, I’m new to postgres so looking for shortcuts.. BTW It would help to have the current version on Pi py right now only the .1 version is there.
    Thanks for providing it.

  2. Tom Brander Says:

    Running Windows Vista and postgresql 8.4
    Well, I’m back! unfortunately have had a few issues,, for some reason pip install does not seem to like your repository so I dl’d by copy and paste, pretty laborious,, then discovered that I needed psycopg2 as a DB driver on Windows (special windows version http://www.stickpeople.com/projects/python/win-psycopg/psycopg2-2.0.13.win32-py2.6-pg8.4.1-release.exe)… so I changed the source and at least got the DB signed on (no password fail and no complaints about the driver) but alas I keep getting errors. And the table does not load.. Been trying to run in debug (things appear to parse well) but alas I’m still too much of a Python Newb to figure the code error out…
    If you feel so inclined advice would be appreciated, if not I understand!

    It is probability some dumb user error but thought the psycopg2 info might help someone.

    File “C:\Users\DadLaptop\Downloads\loadcsv\loadcsv.py”, line 100, in load
    cursor.execute(insert_sql,prepare_values(row))
    ProgrammingError: syntax error at or near “)”
    LINE 1: …xt_Q_Sales,Next_Q_inv,NextQ_Price,Next_Q_Credit) values (?);
    ^
    The ^ is under the (?);

    my header and 1st lines are:
    Region,City_Rural,Res_Comm,Count,Nat_next_Q,Ala_Next_Q,Next_Q_Sales,Next_Q_inv,NextQ_Price,Next_Q_Credit
    North_Central,Suburban_Urban,Residential,1,50,75,75,50,25,50
    North_Central,Suburban_Urban,Commercial,1,25,25,50,25,25,50

  3. Tom Brander Says:

    FWIW I cannot get the psycopg2 adaptor to work stand alone on windows with postgres sql, so I’m back to Mysql for the moment.

Leave a Reply