[Tutor] Type Error
Rohit kumar
krohit at zeomega.com
Mon Sep 14 16:43:13 CEST 2015
Correct, The filename should be passed as string value.
Regards,
--
Rohit Kumar | Technical Lead
ZeOmega | Population Health Management Solutions
Improving Population Health One Person at a Time
Office: +91 80 4243 2000 (4067) | Mobile: +91 9342637703
-----Original Message-----
From: Tutor [mailto:tutor-bounces+rohitraj007=gmail.com at python.org] On
Behalf Of Zachary Ware
Sent: 14 September 2015 20:11
To: tutor
Subject: Re: [Tutor] Type Error
On Mon, Sep 14, 2015 at 9:29 AM, richard kappler <richkappler at gmail.com>
wrote:
> everything works except the os.remove(file) which gives the following
error:
>
> Traceback (most recent call last):
> File "DataFeedBatch.py", line 104, in <module>
> os.remove(file)
> TypeError: coercing to Unicode: need string or buffer, file found
>
> I don't understand the error
os.remove() expects a filename, and you're passing it a 'file' object.
--
Zach
_______________________________________________
Tutor maillist - Tutor at python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
--
This e-mail message (including any attachments) may contain information
that is confidential, protected by the attorney-client or other applicable
privileges, or otherwise comprising non-public information. This message is
intended to be conveyed only to the designated recipient(s). If you have
any reason to believe you are not an intended recipient of this message,
please notify the sender by replying to this message and then deleting it
from your system. Any use, dissemination, distribution, or reproduction of
this message by unintended recipients is not authorized and may be unlawful.
More information about the Tutor
mailing list