You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well @erensezener I couldn't pull from the server since you have merge conflicts... I don't want to mess around with your stuff, so please run my scraper after pulling the new version. But please run it like this:
assertion_count=0unicode_count=0others_count=0file_count=0forday, month, cityinitertools.product(days, months, cities):
date_string='{}-{}-{}'.format(day, month, year)
try:
sc_ac(date_string, city, DATAPATH)
exceptExceptionasex:
ifex==AssertionError: assertion_count+=1elifex==UnicodeDecodeError: unicode_count+=1else: others_count+=1print('Excepted {} in accuweather'.format(type(ex).__name__))
print(traceback.print_exc())
withopen("accuweather_excepted_errors.txt", "a") asmyfile:
myfile.write('Excepted {} for date={}, city={}:\n{}\n\n'.format(type(ex).__name__, date_string, city, ex))
file_count+=1tot=assertion_count+unicode_count+others_countprint('\n\nFinished saving ACCUWEATHER data fo database\n Excepted errors: {}/{}\n\tAssertionErrors: {}\n\t UnicodeDecodeErrors: {}\n\t Other errors: {}\ndetails saved in accuweather_excepted_errors.txt'.format(tot, file_count, assertion_count, unicode_count, others_count))
withopen("accuweather_excepted_errors.txt", "a") asmyfile:
myfile.write('\n\nFinished saving ACCUWEATHER data fo database\n Excepted errors: {}/{}\n\tAssertionErrors: {}\n\t UnicodeDecodeErrors: {}\n\t Other errors: {}\ndetails saved in accuweather_excepted_errors.txt'.format(tot, file_count, assertion_count, unicode_count, others_count))
This excepts all errors and creates a file accuweather_excepted_errors.txt with details about them. Could you please post that file here after running the scraper? Thank you.
The text was updated successfully, but these errors were encountered:
Well @erensezener I couldn't pull from the server since you have merge conflicts... I don't want to mess around with your stuff, so please run my scraper after pulling the new version. But please run it like this:
This excepts all errors and creates a file
accuweather_excepted_errors.txt
with details about them. Could you please post that file here after running the scraper? Thank you.The text was updated successfully, but these errors were encountered: