-
Notifications
You must be signed in to change notification settings - Fork 338
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
07.1 Text Classification & 07.2 Emoji Suggestions -- ModuleNotFoundError: No module named 'nb_utils' #70
Comments
Thanks for flagging. I'll have a look! |
Hi Douwe: I solve the issue after uploading nb_utils.py and change the directory name from deep_learning_cookbook-master to dl-cookbook. Since the downloaded document is deep_learning_cookbook-master, but nb_utils.py includes the name of dl-cookbook. So the two names have a conflict. Best regards, Mike |
After solving the issue of nb_utils, a new issue emerges. I address the issue and its related solution. Issue of Parsing:
Soluton: I solve it with the downloaded text_emotion.csv. The download address is https://github.com/johnvblazic/emotionDetectionDataset. I am pleased to provide the related line of code as follows.
#------------------------------------------------------------------------------------------------------------------------ ParserError Traceback (most recent call last) /usr/local/lib/python3.6/dist-packages/pandas/io/parsers.py in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, dialect, error_bad_lines, warn_bad_lines, delim_whitespace, low_memory, memory_map, float_precision) /usr/local/lib/python3.6/dist-packages/pandas/io/parsers.py in _read(filepath_or_buffer, kwds) /usr/local/lib/python3.6/dist-packages/pandas/io/parsers.py in read(self, nrows) /usr/local/lib/python3.6/dist-packages/pandas/io/parsers.py in read(self, nrows) pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader.read() pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._read_low_memory() pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._read_rows() pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._tokenize_rows() pandas/_libs/parsers.pyx in pandas._libs.parsers.raise_parser_error() ParserError: Error tokenizing data. C error: Expected 15 fields in line 17, saw 25 |
Hi Douwe:
How to deal with the issue? There are many applications have the module of nb_utils in Deep Learning Cookbook. Beside of 07.1, 07.2 Emoji Suggestions has the same issue. Would you please solve the issue?
import pandas as pd
from keras.utils.data_utils import get_file
import nb_utils
emotion_csv = get_file('text_emotion.csv',
'https://www.crowdflower.com/wp-content/uploads/2016/07/text_emotion.csv')
emotion_df = pd.read_csv(emotion_csv)
Using TensorFlow backend.
ModuleNotFoundError Traceback (most recent call last)
in
1 import pandas as pd
2 from keras.utils.data_utils import get_file
----> 3 import nb_utils
4
5 emotion_csv = get_file('text_emotion.csv',
ModuleNotFoundError: No module named 'nb_utils'
Best regards,
Mike
The text was updated successfully, but these errors were encountered: