[ase-users] crystal error

Ask Hjorth Larsen askhl at fysik.dtu.dk
Thu Jan 20 23:13:33 CET 2011


Hi Yuelin

On Thu, 20 Jan 2011, Yuelin Li wrote:

> Cannot get through with the example in the manual ...
> 
> ---------------------------------------------------------------------------
> ---------------
> 
> diamond = crystal(’C’, [(0,0,0)], spacegroup=227, cellpar=[a, a, a, 90, 90,
> 90])
>   File "<stdin>", line 1
>     diamond = crystal(’C’, [(0,0,0)], spacegroup=227, cellpar=[a, a, a, 90,
> 90, 90])
>                       ^
> SyntaxError: invalid syntax
> 
> 
>

The apostrophes used for strings in Python ('') seem to have been 
replaced, possibly by a program, by admittedly fancier but also less 
syntactically correct ones (’’).

When viewing the web page it appears correctly in my browser (code can be 
pasted into Python and run).

Best regards
Ask


More information about the ase-users mailing list