Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

When i try to run the RatingsBreakdown.py code, i found this error please rectify this error

Solved Go to solution

When i try to run the RatingsBreakdown.py code, i found this error please rectify this error

New Contributor

When i try to run RatingsBreakdown.py i found this error, please rectify the error formed

43567-map-reduce-error.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: When i try to run the RatingsBreakdown.py code, i found this error please rectify this error

@Karthick Raja,

Check this line in your code

RatingsBreakdown.py line 12, in mapper_get_ratings

(userID, movieID, rating, timestamp ) = line.split('\t')

The line should have exactly 4 values else you may get the issue 'ValueError: need more than 2 values to unpack' . Check the input or add a validation

if len(line.split('\t')) == 4:
	(userID, movieID, rating, timestamp ) = line.split('\t')

2 REPLIES 2

Re: When i try to run the RatingsBreakdown.py code, i found this error please rectify this error

New Contributor

please reply community, i need your help

Highlighted

Re: When i try to run the RatingsBreakdown.py code, i found this error please rectify this error

@Karthick Raja,

Check this line in your code

RatingsBreakdown.py line 12, in mapper_get_ratings

(userID, movieID, rating, timestamp ) = line.split('\t')

The line should have exactly 4 values else you may get the issue 'ValueError: need more than 2 values to unpack' . Check the input or add a validation

if len(line.split('\t')) == 4:
	(userID, movieID, rating, timestamp ) = line.split('\t')