according to the book if I have the right code

217 Attempt to Generate Code in Non-Code Segment

Due to the Harvard Architecture (split code and data spaces) of the PICmicro
MCUs, instructions may only be executed from CODE space (ROM). This error
indicates that an attempt was made to generate opcodes in the data or
EEPROM segments. In general, only the DS pseudo-op is legal in the data
segment and DS, DB and DW are the only legal pseudo-ops in the EEPROM
segment.
if that doesn't help you might need to post your latest code