Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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

avatar

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

43567-map-reduce-error.jpg

1 ACCEPTED SOLUTION

avatar
Super Guru

@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')

View solution in original post

2 REPLIES 2

avatar

please reply community, i need your help

avatar
Super Guru

@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')