Created
August 30, 2017 20:07
-
-
Save jtemporal/a176961eddea584dbea05e88a5466293 to your computer and use it in GitHub Desktop.
Error traceback while running Rosie
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python rosie.py run chamber_of_deputies ../data | |
/Users/temporal/src/dsbr/serenata/rosie/rosie/chamber_of_deputies/adapter.py:25: DtypeWarning: Columns (10,17) have mixed types. Specify dtype option on import or set low_memory=False. | |
self.update_datasets() | |
Merging all datasets… | |
Loading reimbursements-2009.xz… | |
Loading reimbursements-2010.xz… | |
Loading reimbursements-2011.xz… | |
Loading reimbursements-2012.xz… | |
Loading reimbursements-2013.xz… | |
Loading reimbursements-2014.xz… | |
/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/reshape/concat.py:206: DtypeWarning: Columns (17) have mixed types. Specify dtype option on import or set low_memo | |
ry=False. | |
copy=copy) | |
Loading reimbursements-2015.xz… | |
Loading reimbursements-2016.xz… | |
Loading reimbursements-2017.xz… | |
Dropping rows without document_value or reimbursement_number… | |
Grouping dataset by applicant_id, document_id and year… | |
Gathering all reimbursement numbers together… | |
Summing all net values together… | |
Summing all reimbursement values together… | |
Generating the new dataset… | |
Casting changes to a new DataFrame… | |
Writing it to file… | |
Done. | |
Downloading 2016-09-03-companies.xz: 100%|█████████████████████| 4.84M/4.84M [00:01<00:00, 2.98Mb/s] | |
Traceback (most recent call last): | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/nanops.py", line 768, in _ensure_numeric | |
x = float(x) | |
ValueError: could not convert string to float: '77,99' | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/nanops.py", line 771, in _ensure_numeric | |
x = complex(x) | |
ValueError: complex() arg is a malformed string | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/nanops.py", line 119, in f | |
result = alt(values, axis=axis, skipna=skipna, **kwds) | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/nanops.py", line 312, in nanmean | |
the_sum = _ensure_numeric(values.sum(axis, dtype=dtype_sum)) | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/nanops.py", line 773, in _ensure_numeric | |
raise TypeError('Could not convert %s to numeric' % str(x)) | |
TypeError: Could not convert 77,99 to numeric | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/nanops.py", line 768, in _ensure_numeric | |
x = float(x) | |
ValueError: could not convert string to float: '77,99' | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/nanops.py", line 771, in _ensure_numeric | |
x = complex(x) | |
ValueError: complex() arg is a malformed string | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "rosie.py", line 60, in <module> | |
command() | |
File "rosie.py", line 34, in run | |
klass.main(target_directory) | |
File "/Users/temporal/src/dsbr/serenata/rosie/rosie/chamber_of_deputies/__init__.py", line 9, in main | |
core() | |
File "/Users/temporal/src/dsbr/serenata/rosie/rosie/core/__init__.py", line 39, in __call__ | |
model = self.load_trained_model(classifier) | |
File "/Users/temporal/src/dsbr/serenata/rosie/rosie/core/__init__.py", line 60, in load_trained_model | |
model.fit(self.dataset) | |
File "/Users/temporal/src/dsbr/serenata/rosie/rosie/chamber_of_deputies/classifiers/meal_price_outlier_classifier.py", line 39, in fit | |
companies = _X.groupby('recipient_id').apply(self.__company_stats) \ | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/groupby.py", line 716, in apply | |
return self._python_apply_general(f) | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/groupby.py", line 720, in _python_apply_general | |
self.axis) | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/groupby.py", line 1802, in apply | |
res = f(group) | |
File "/Users/temporal/src/dsbr/serenata/rosie/rosie/chamber_of_deputies/classifiers/meal_price_outlier_classifier.py", line 93, in __company_stats | |
stats = {'mean': np.mean(X['net_value']), | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 2906, in mean | |
return mean(axis=axis, dtype=dtype, out=out, **kwargs) | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/generic.py", line 6342, in stat_func | |
numeric_only=numeric_only) | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/series.py", line 2381, in _reduce | |
return op(delegate, skipna=skipna, **kwds) | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/nanops.py", line 62, in _f | |
return f(*args, **kwargs) | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/nanops.py", line 122, in f | |
result = alt(values, axis=axis, skipna=skipna, **kwds) | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/nanops.py", line 312, in nanmean | |
the_sum = _ensure_numeric(values.sum(axis, dtype=dtype_sum)) | |
File "/Users/temporal/anaconda3/envs/serenata_rosie/lib/python3.6/site-packages/pandas/core/nanops.py", line 773, in _ensure_numeric | |
raise TypeError('Could not convert %s to numeric' % str(x)) | |
TypeError: Could not convert 77,99 to numeric |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment