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

Cannot compile and deploy Perfume locally #119

Open
CostaSkyrim opened this issue May 27, 2023 · 1 comment
Open

Cannot compile and deploy Perfume locally #119

CostaSkyrim opened this issue May 27, 2023 · 1 comment

Comments

@CostaSkyrim
Copy link

Problem 1

There is a wrong link set when cloning the perfume-frontend in the bash script.
# Clone perfume frontend repository echo ===== CLONING REPOSITORY ===== hg clone https://bitbucket.org/bestchai/perfume-frontend
It should be replaced with git clone https://github.com/ModelInference/perfume-frontend

Problem 2

Finally, there is an error saying that it can't find the Cheetah.Template in the MakePython.py
`import subprocess
from Cheetah.Template import Template

def compile_templates():
parameters = {"commitSha":getRevision()}
with open('./template/index_template.html', 'r') as templatefile:
template = templatefile.read()
compiled_template = Template(template, searchList=parameters).str()
with open('index.html', 'w') as postfile:
postfile.write(compiled_template)

def getRevision():
p = subprocess.Popen(['hg', 'identify'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sha, err = p.communicate()
sha = sha.split()
return sha[0][:-1]

compile_templates()`

This is probably due to using the Cheetah python library which is very outdated and doesn't work with python3+ (it can't even be installed with pip due to many errors). It should be changed to a fork of Cheetah called Cheetah3 which is more modern.

@bestchai
Copy link
Member

bestchai commented Jun 7, 2023

Thanks for your interest. Unfortunately, the project is 10 years old now and is no longer supported. If you'd be willing to submit a PR with fixes, I can try to reproduce on my end and merge it in.

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