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

bad unicode handling in new NRC scraper #4

Open
pwoods25443 opened this issue Dec 19, 2014 · 0 comments
Open

bad unicode handling in new NRC scraper #4

pwoods25443 opened this issue Dec 19, 2014 · 0 comments

Comments

@pwoods25443
Copy link
Member

Running this:

nohup /srv/scrapy/bin/python /srv/scrapy/new-scraper/bin/nrcSpreadsheetScraper.py --db-host ewn3.skytruth.org --db-user scraper --db-pass EsyfylE48CD2D0gB6V6Y --print-queries &

Produced this:

...
INSERT INTO public."NrcScrapedMaterial" (reportnum, name, reached_water, chris_code, amount, unit) VALUES (1073139.0, 'GASOLINE: AUTOMOTIVE (UNLEADED)', 'NO', 'GAS', 17000.0, 'LITER(S)');

Traceback (most recent call last):
File "/srv/scrapy/new-scraper/bin/nrcSpreadsheetScraper.py", line 2090, in
sys.exit(main(sys.argv[1:]))
File "/srv/scrapy/new-scraper/bin/nrcSpreadsheetScraper.py", line 2049, in main
print(query)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xd3' in position 315: ordinal not in range(128)

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