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

datasette publish: error using custom template #21

Open
aborruso opened this issue Apr 23, 2020 · 0 comments
Open

datasette publish: error using custom template #21

aborruso opened this issue Apr 23, 2020 · 0 comments

Comments

@aborruso
Copy link

Hi,
I have created a template folder and I have put inside it a copy of base.html and index.html official template files.

I have edited nothing, and then run (to make a test) simply

datasette publish now mydb.db --project=my-database --template-dir=template

I have the error below. What's wrong in my procedure or in my system?

Thank you

Traceback (most recent call last):
  File "/home/aborruso/.local/lib/python3.7/site-packages/datasette/utils/__init__.py", line 607, in link_or_copy_directory
    shutil.copytree(src, dst, copy_function=os.link)
  File "/usr/lib/python3.7/shutil.py", line 365, in copytree
    raise Error(errors)
shutil.Error: [('/myfolderproject/processing/template/base.html', '/tmp/tmpfccqqfod/datasette-now-v2/templates/base.html', "[Errno 18] Invalid cross-device link: '/myfolderproject/processing/template/ba
se.html' -> '/tmp/tmpfccqqfod/datasette-now-v2/templates/base.html'"), ('/myfolderproject/processing/template/index.html', '/tmp/tmpfccqqfod/datasette-now-v2/templates/index.html', "[Errno 18] Invalid cross-device link: '/mnt/c/Users/aborr/Do
cuments/GitHub/youtubeComunePalermo/processing/template/index.html' -> '/tmp/tmpfccqqfod/datasette-now-v2/templates/index.html'")]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/aborruso/.local/bin/datasette", line 8, in <module>
    sys.exit(cli())
  File "/home/aborruso/.local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/aborruso/.local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/aborruso/.local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/aborruso/.local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/aborruso/.local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/aborruso/.local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/aborruso/.local/lib/python3.7/site-packages/datasette_publish_now/__init__.py", line 118, in now
    port=8080,
  File "/usr/lib/python3.7/contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "/home/aborruso/.local/lib/python3.7/site-packages/datasette/utils/__init__.py", line 396, in temporary_docker_directory
    os.path.join(datasette_dir, "templates"),
  File "/home/aborruso/.local/lib/python3.7/site-packages/datasette/utils/__init__.py", line 609, in link_or_copy_directory
    shutil.copytree(src, dst)
  File "/usr/lib/python3.7/shutil.py", line 321, in copytree
    os.makedirs(dst)
  File "/usr/lib/python3.7/os.py", line 221, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/tmp/tmpfccqqfod/datasette-now-v2/templates'
@simonw simonw transferred this issue from simonw/datasette Apr 27, 2020
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

1 participant