I am running a small python code. The main module calls another data loader 
module. I keep this getting this error.

AttributeError: 'str' object has no attribute 'raw_data' 

I tried few things in the code and finally realized that no matter the line 
number is 68 of data loader module. Of course, this was after a few iterations.
I then commented this line itself but I still get this error.

Below is a little longer code snippet.

AttributeErrorTraceback (most recent call last)
D:\Projects\Initiatives\machine learning\Log analyzer\log_analyzer.py in 
<module>()
     32         model = para['models']
     33         assert model in ['DT', 'LR', 'SVM']
---> 34         raw_data, event_mapping_data = data_loader.bgl_data_loader(para)
     35 
     36 logger.debug("raw data %s \n", raw_data)
D:\Projects\Initiatives\machine 
learning\loglizer-master\loglizer-master\utils\data_loader.py in 
bgl_data_loader(para)
     66         # get the label for each log
     67         data_df['label'] = (data_df['label'] != '-').astype(int)
---> 68         #logger.debug("data frame %s \n", data_df)
     69         logger.debug("\n")
     70         raw_data = data_df[['label','seconds_since']].as_matrix()
AttributeError: 'str' object has no attribute 'raw_data' 

If you notice, line 68 is commented.
I am not sure what I am doing wrong.

Need some inputs ...
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to