Uploading a static project to google app engines

2024/10/4 7:25:44

Disclaimer: I already asked here, but apparently off-topic.

I want to set up a page using this bootstrap template and host it as a static website using the google appengine service.

Inside the google_appengine directory, I created a folder page with the page data and the app.yaml:

  • google_appengine [folder]
  • ...
  • dev_appserver.py
  • appcfg.py
  • ...
  • page [folder]
    • app.yaml
    • public [folder]

app.yaml has this as a content:

          application: coolmoonversion: 1runtime: python27api_version: 1threadsafe: yeshandlers:- url: /(.+)static_files: public/\1upload: public/(.*)- url: /static_files: public/index.htmlupload: public/index.htmlskip_files:- ^(.*/)?app\.yaml- ^(.*/)?app\.yml- ^(.*/)?#.*#- ^(.*/)?.*~- ^(.*/)?.*\.py[co]- ^(.*/)?.*/RCS/.*- ^(.*/)?\..*- ^(.*/)?tests$- ^(.*/)?test$- ^test/(.*/)?- ^COPYING.LESSER- ^README\..*- \.gitignore- ^\.git/.*- \.*\.lint$- ^fabfile\.py- ^testrunner\.py- ^grunt\.js- ^node_modules/(.*/)?

When I'm inside the google_appengine folder and I run

python dev_appserver.py page

I get the error message

 Traceback (most recent call last):   File "dev_appserver.py", line 82,in <module>_run_file(__file__, globals())   File "dev_appserver.py", line 78, in _run_fileexecfile(_PATHS.script_file(script_name), globals_)   File "/home/bogus/webpage/google_appengine/google/appengine/tools/devappserver2/devappserver2.py",line 943, in <module>main()   File "/home/bogus/webpage/google_appengine/google/appengine/tools/devappserver2/devappserver2.py",line 936, in maindev_server.start(options)   File "/home/bogus/webpage/google_appengine/google/appengine/tools/devappserver2/devappserver2.py",line 695, in startoptions.config_paths)   File "/home/bogus/webpage/google_appengine/google/appengine/tools/devappserver2/application_configuration.py",line 617, in __init__config_paths = self._config_files_from_paths(config_paths)   File "/home/bogus/webpage/google_appengine/google/appengine/tools/devappserver2/application_configuration.py",line 682, in _config_files_from_pathsself._config_files_from_dir(path) if os.path.isdir(path) else [path])   File"/home/bogus/webpage/google_appengine/google/appengine/tools/devappserver2/application_configuration.py",line 710, in _config_files_from_dir(dir_path, or_web_inf)) google.appengine.tools.devappserver2.errors.AppConfigNotFoundError:"page/" is a directory but does not contain app.yaml or app.yml

but app.yaml is definitely inside the folder page

What is going wrong?

Is my command correct?

Answer

Why not use Amazon S3 or a similar service? It is more geared towards this sort of thing.

https://en.xdnf.cn/q/70632.html

Related Q&A

Python cannot import DataFrame

I am trying to use Pandas in Python to import and manipulate some csv file.my code is like:import pandas as pd from pandas import dataframe data_df = pd.read_csv(highfrequency2.csv) print(data_df.col…

Sum of product of combinations in a list

What is the Pythonic way of summing the product of all combinations in a given list, such as:[1, 2, 3, 4] --> (1 * 2) + (1 * 3) + (1 * 4) + (2 * 3) + (2 * 4) + (3 * 4) = 35(For this example I have t…

discord.py: How to get the user who invited/added the bot to his server? [solution]

I want to send a DM to the user, who invited/added the bot to his server. I noticed that its displayed in the audit log. Can I fetch that and get the user or is there a easier way to achieve that? Ex…

How to reorder the keys of a dictionary?

I have multiple dictionaries inside the list. I want to sort the dictionary with the custom key. In my case, I want to sort it using Date key. By that, I mean to move the Date key to the first position…

How do bitwise operations work in Python?

I have been learning about Bitwise operations today and I learned that Not (~) inverses all bits, e.g.:01010 to 10101which means ~10 should be -5 but instead I have seen that it is -11 (per the python …

How to split large wikipedia dump .xml.bz2 files in Python?

I am trying to build a offline wiktionary using the wikimedia dump files (.xml.bz2) using Python. I started with this article as the guide. It involves a number of languages, I wanted to combine all th…

CherryPy interferes with Twisted shutting down on Windows

Ive got an application that runs Twisted by starting the reactor with reactor.run() in my main thread after starting some other threads, including the CherryPy web server. Heres a program that shuts d…

From subprocess.Popen to multiprocessing

I got a function that invokes a process using subprocess.Popen in the following way:def func():...process = subprocess.Popen(substr, shell=True, stdout=subprocess.PIPE)timeout = {"value": Fal…

Assigning float as a dictionary key changes its precision (Python)

I have a list of floats (actually its a pandas Series object, if it changes anything) which looks like this:mySeries:... 22 16.0 23 14.0 24 12.0 25 10.0 26 3.1 ...(So elements…

Installing jpype in Mountain Lion

I am trying to install jpype in Mountain Lion. I followed all the steps suggested in this post: How to install JPype on OS X Lion to use with Neo4j?However, there is a glitch with Mountain Lion. I hav…