Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

praseAtoms does not work with occ #17

Open
KwonSnow opened this issue Jun 25, 2020 · 1 comment
Open

praseAtoms does not work with occ #17

KwonSnow opened this issue Jun 25, 2020 · 1 comment

Comments

@KwonSnow
Copy link

KwonSnow commented Jun 25, 2020

Dear Dr. Zheng,

when I use --occ '1 2', error occurs
ValueError: invalid literal for int() with base 10: "'1"

When I check opts.occ, it was ["'1"] instead of ['1 2'] or [1, 2] or ['1'. '2'].
It seems the parser does not work correctly to get the atom list.
The same issue also occurs with pydos.

If I use " instead of ', so "1 2", it looks fine. It printed,
opts.occ: ['1 2']
occ: 1, 2
occAtom: {1, 2}
I'm wondering if the code works okay with those occ variables!

Any help would be greatly appreciated!
Thank you!

Best regards,
Soonho

@QijingZheng
Copy link
Owner

Hi Soonho

I can not reproduce your error if I just enter

pyband --occ '1 2'

However, if I enter

pyband --occ "'1 2"

then I can see error similar to yours.

In fact, the single and double quote in bash shell are almost identical for a string, there is no way that you can succeed with double quotes and not the single one. Could you please send me a screenshot of your execution and the error message?

Best
Qijing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants