You may have a blockage of the bile ducts, causing the bile to back up into your liver.There may be a hole in the bile duct causing bile to leak.To prepare for surgery or for some other procedure on your bile ducts, such as removal of a stone or tumor.