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

question about flask app #1

Open
samistat08 opened this issue Dec 3, 2020 · 3 comments
Open

question about flask app #1

samistat08 opened this issue Dec 3, 2020 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@samistat08
Copy link

Hello,

I am trying to build a shopify flask app using your guide here but the code does not work on my local environment. I have already updated the config file although I think the problem is there as I get the 'SyntaxError: invalid syntax' error when running server.py.

@Paulinakhew
Copy link
Contributor

if you are getting this error

  File "src/server.py", line 76
    logging.error(f"webhook call received {webhook_topic}:\n{json.dumps(webhook_payload, indent=4)}")
                                                                                                   ^
SyntaxError: invalid syntax

It might be from you running

python src/server.py

Instead, try running

python3 src/server.py

This is because f-strings were only introduced in python 3

@garettB garettB added the documentation Improvements or additions to documentation label Feb 9, 2021
@sanjay-makwana-avidbrio

this app working fine as per the documents mention

@sanjay-makwana-avidbrio

hoe run shopify flask app in localhost

system specification

OS Ubuntu 20.04 LST

python
Python 3.8.5 (default, Jan 27 2021, 15:41:15) 

installing python pip3

$ sudo apt-get install python3-pip

[option ] you can you system python environments

$ sudo apt install python3-virtualenv
$ sudo apt-get install python3-venv

creating python virtual environments

$ python3 -m venv myvenv

Activate the virtual environments

$ source myvenv/bin/activate

now your terminal look likes
(myvenv) user@sys $

download the code from https://github.com/garettB/shopify-flask-example/archive/refs/heads/master.zip
[ or you can clone use for git ]

(myvenv) user@sys $ #goto code root directory
(myvenv) user@sys $ ll #chech the requirements.txt avalable in curent path
(myvenv) user@sys $ pip3 install -r requirements.txt
(myvenv) user@sys $ cd src/
(myvenv) user@sys $ cp .env.template .env

@samistat08 please check this

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

No branches or pull requests

4 participants