Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #40476
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <iandouglas736@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.006 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'properly.': 0.07; 'ioerror:': 0.09; 'open()': 0.09; 'skip:\\ 40': 0.09; 'subject:script': 0.09; 'whatever.': 0.09; 'cc:addr:python- list': 0.10; 'subject:not': 0.11; 'csv': 0.16; 'subject:windows': 0.16; 'try/except': 0.16; 'wrote:': 0.17; 'windows': 0.19; 'skip:" 30': 0.20; 'tells': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; '(which': 0.26; 'skip:" 20': 0.26; '(most': 0.27; 'am,': 0.27; 'maybe': 0.29; 'error': 0.30; 'file': 0.32; "skip:' 20": 0.32; 'traceback': 0.33; 'received:google.com': 0.34; 'ahead': 0.35; 'path': 0.35; 'open': 0.35; 'received:192.168.0': 0.35; 'received:209.85': 0.35; 'message- id:@gmail.com': 0.36; 'uses': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'instead': 0.39; 'received:192': 0.39; 'called': 0.39; 'received:192.168': 0.40; 'your': 0.60; "you'll": 0.62; 'different': 0.63; 'lives': 0.71; 'directory:': 0.84; 'to:addr:libero.it': 0.84; 'imagine': 0.96 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=LQ7JfqBwTlkLsEkk8Sown/3OdjEr/dgnKHHNeKoN0I0=; b=ufnrspnBDHd3lcrdZk8MYozG1QQhUdNZSW4cn4fcN5ZwD55knyXmJe4nEW4x1RRrcX LwYyZacGVUgWpjYbzOo5v9gnsAL8IHYlz2T0utZoqySKVN4pXHIteObRFtQdFEorwZBg DB7MiTXz5lvu8gp1hzSmrJGxB3gsdUCEnsTVShAIHbAy+Xn5Uhc+cQoByn0r3eOGbu0d DiKT6RyGd/KKrHxnbD9uOJB4uyvLqaqQb89/NhZ3NyZhUZfdgTtRY85nsii1szSi2brb L6GM9DCuEBD4bKuki90YH49HConUZFFpiBJHZS1uYfJso74Gbbs6RUZ9QqAQRqVRmSAz MCaQ== |
| X-Received | by 10.68.231.42 with SMTP id td10mr10433598pbc.174.1362424831948; Mon, 04 Mar 2013 11:20:31 -0800 (PST) |
| Date | Mon, 04 Mar 2013 11:20:28 -0800 |
| From | ian douglas <iandouglas736@gmail.com> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 |
| MIME-Version | 1.0 |
| To | io <maroso@libero.it> |
| Subject | Re: Python script not working on windows 7 but works fine on linux |
| References | <5134f0d1$0$40360$4fafbaef@reader1.news.tin.it> |
| In-Reply-To | <5134f0d1$0$40360$4fafbaef@reader1.news.tin.it> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2854.1362424842.2939.python-list@python.org> (permalink) |
| Lines | 22 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1362424842 news.xs4all.nl 6966 [2001:888:2000:d::a6]:52348 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:40476 |
Show key headers only | View raw
On 03/04/2013 11:06 AM, io wrote:
> esclusioni_file = open('/home/io/btc_trading/exclusions.txt','r')
>
> Windows error :
>
> Traceback (most recent call last):
> File "C:\btc_trading\scripts
> \import_json_2_csv_from_web_and_exclusions.py", line 10, in <module>
> f = open("/home/io/btc_trading/markets.csv","wb")
> IOError: [Errno 2] No such file or directory: '/home/io/btc_trading/
> markets.csv'
The error tells you everything you need to know: the file system has no
path/file called "/home/io/btc_trading/markets.csv"
I imagine your CSV file lives in a different location on your Windows 7
system (which also uses back-slashes '\' instead of forward-slashes '/',
so you'll need to maybe do a try/except around the open() call to open a
Windows path like open("c:\\users\\io\\Documents\\markets.csv") or
whatever. OR you'll need to do some OS detection ahead of time to set
the file path properly.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python script not working on windows 7 but works fine on linux io <maroso@libero.it> - 2013-03-04 19:06 +0000
Re: Python script not working on windows 7 but works fine on linux Christian Gollwitzer <auriocus@gmx.de> - 2013-03-04 20:20 +0100
Re: Python script not working on windows 7 but works fine on linux io <maroso@libero.it> - 2013-03-04 19:58 +0000
Re: Python script not working on windows 7 but works fine on linux ian douglas <iandouglas736@gmail.com> - 2013-03-04 11:20 -0800
Re: Python script not working on windows 7 but works fine on linux io <maroso@libero.it> - 2013-03-04 19:59 +0000
Re: Python script not working on windows 7 but works fine on linux Chris Angelico <rosuav@gmail.com> - 2013-03-05 07:56 +1100
Re: Python script not working on windows 7 but works fine on linux Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-05 01:58 +0000
Re: Python script not working on windows 7 but works fine on linux Andrew Berg <bahamutzero8825@gmail.com> - 2013-03-04 20:25 -0600
Re: Python script not working on windows 7 but works fine on linux 88888 Dihedral <dihedral88888@googlemail.com> - 2013-03-04 18:58 -0800
Re: Python script not working on windows 7 but works fine on linux 88888 Dihedral <dihedral88888@googlemail.com> - 2013-03-04 18:58 -0800
Re: Python script not working on windows 7 but works fine on linux Wolfgang Strobl <news4@mystrobl.de> - 2013-03-04 20:30 +0100
Re: Python script not working on windows 7 but works fine on linux Terry Reedy <tjreedy@udel.edu> - 2013-03-04 16:19 -0500
csiph-web