# another grind.py bug

**URL:** <https://discourse.citationstyles.org/t/another-grind-py-bug/664>\
**Category:** CSL Development\
**Created:** [June 17, 2009, 1:35pm UTC](https://discourse.citationstyles.org/t/another-grind-py-bug/664 "2009-06-17T13:35:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [June 17, 2009, 1:35pm UTC](https://discourse.citationstyles.org/t/another-grind-py-bug/664/1 "2009-06-17T13:35:02Z")

</div>

Frank,

~/xbiblio/csl/data/std $ python [grind.py](http://grind.py)  
Traceback (most recent call last):  
File “[grind.py](http://grind.py)”, line 192, in   
os.chdir(mypath)  
OSError: [Errno 2] No such file or directory: ‘’

If I add a path on the commandline, I get this:

$ python [grind.py](http://grind.py) .  
File “[grind.py](http://grind.py)”, line 1  
SyntaxError: Non-ASCII character ‘\xe2’ in file [grind.py](http://grind.py) on line 1,  
but no encoding declared; see [http://www.python.org/peps/pep-0263.html](http://www.python.org/peps/pep-0263.html)  
for details

Bruce

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [June 17, 2009, 2:42pm UTC](https://discourse.citationstyles.org/t/another-grind-py-bug/664/2 "2009-06-17T14:42:48Z")

</div>

> Frank,
> 
> ~/xbiblio/csl/data/std $ python grind.py  
> Traceback (most recent call last):  
> File “grind.py”, line 192, in   
> os.chdir(mypath)  
> OSError: [Errno 2] No such file or directory: ‘’

Not sure why you want to run the program with this syntax, but it will work now.

> If I add a path on the commandline, I get this:
> 
> $ python grind.py .  
> File “grind.py”, line 1  
> SyntaxError: Non-ASCII character ‘\xe2’ in file grind.py on line 1,  
> but no encoding declared; see [PEP 263 – Defining Python Source Code Encodings | peps.python.org](http://www.python.org/peps/pep-0263.html)  
> for details

Can’t reproduce this error (the command line above is identical to the other  
that in the previous example).

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [June 17, 2009, 2:54pm UTC](https://discourse.citationstyles.org/t/another-grind-py-bug/664/3 "2009-06-17T14:54:16Z")

</div>

> > Frank,
> > 
> > ~/xbiblio/csl/data/std $ python grind.py  
> > Traceback (most recent call last):  
> > File “grind.py”, line 192, in   
> > os.chdir(mypath)  
> > OSError: [Errno 2] No such file or directory: ‘’
> 
> Not sure why you want to run the program with this syntax, but it will work now.

This is what the documentation suggests 😉

> > If I add a path on the commandline, I get this:
> > 
> > $ python grind.py .  
> > File “grind.py”, line 1  
> > SyntaxError: Non-ASCII character ‘\xe2’ in file grind.py on line 1,  
> > but no encoding declared; see [PEP 263 – Defining Python Source Code Encodings | peps.python.org](http://www.python.org/peps/pep-0263.html)  
> > for details
> 
> Can’t reproduce this error (the command line above is identical to the other  
> that in the previous example).

There was some funky character at position 1; I removed it.

Bruce
