campusx-official / movie-recommender-system-tmdb-dataset

A content based movie recommender system using cosine similarity
147 stars 244 forks source link

ValueError: source code string cannot contain null bytes #6

Open Nikhilsinghbora opened 1 year ago

Nikhilsinghbora commented 1 year ago

Getting error while vectorizing the string i use ->

from sklearn.feature_extraction.text import CountVectorizer 
cv = CountVectorizer(max_features=5000,stop_words='english')

error I got - >

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_4156\3031649546.py in <module>
----> 1 from sklearn.feature_extraction.text import CountVectorizer
      2 cv = CountVectorizer(max_features=5000,stop_words='english')

~\anaconda3\lib\site-packages\sklearn\__init__.py in <module>
     80     from . import _distributor_init  # noqa: F401
     81     from . import __check_build  # noqa: F401
---> 82     from .base import clone
     83     from .utils._show_versions import show_versions
     84 

~\anaconda3\lib\site-packages\sklearn\base.py in <module>
     15 from . import __version__
     16 from ._config import get_config
---> 17 from .utils import _IS_32BIT
     18 from .utils._tags import (
     19     _DEFAULT_TAGS,

~\anaconda3\lib\site-packages\sklearn\utils\__init__.py in <module>
     19 import warnings
     20 import numpy as np
---> 21 from scipy.sparse import issparse
     22 
     23 from .murmurhash import murmurhash3_32

~\anaconda3\lib\site-packages\scipy\__init__.py in <module>
     72 
     73 # Import numpy symbols to scipy name space (DEPRECATED)
---> 74 from ._lib.deprecation import _deprecated
     75 import numpy as _num
     76 linalg = None

ValueError: source code string cannot contain null bytes
rishi-narayan10 commented 9 months ago

The Repo, code itself is incomplete, the full code is in you tube. But it must be corrected here to for the reference.