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

Getting error while installing the price-parser #25

Closed
rpalsaxena opened this issue Dec 19, 2019 · 5 comments
Closed

Getting error while installing the price-parser #25

rpalsaxena opened this issue Dec 19, 2019 · 5 comments

Comments

@rpalsaxena
Copy link
Contributor

I wanted to contribute to this repo. Tried to install it manually using the python setup.py develop and python setup.py commands but it gave me errors.

image

@rpalsaxena
Copy link
Contributor Author

I resolved this issue by making an edit in the setup.py. It works correctly on Linux OS. The error seems to occur only on Windows machine.

It got resolved by adding encoding="utf8" parameter.

    long_description=open('README.rst', encoding="utf8").read() + "\n\n" + open('CHANGES.rst').read(),

@lopuhin
Copy link
Member

lopuhin commented Dec 19, 2019

Thanks for investigating @rpalsaxena . Would you like to send a pull request with this fix?

@lopuhin lopuhin reopened this Dec 19, 2019
@rpalsaxena
Copy link
Contributor Author

rpalsaxena commented Dec 19, 2019

I have created a pull request but there's another issue that I'm facing while importing it.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\rpals\Desktop\price-parser\price_parser\__init__.py", line 2, in <module>
    from .parser import Price, parse_price
  File "C:\Users\rpals\Desktop\price-parser\price_parser\parser.py", line 14
    amount: Optional[Decimal]   # price numeric value, as Decimal
          ^
SyntaxError: invalid syntax

@lopuhin
Copy link
Member

lopuhin commented Dec 19, 2019

This error seems to originate from a python version mismatch - priceparser requires python 3.6 or newer

@rpalsaxena
Copy link
Contributor Author

You're right @lopuhin ! :)

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