Git Product home page Git Product logo

vercel-django-example's People

Contributors

jayhale avatar pejowei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vercel-django-example's Issues

Hi, can't deploy django on vercel as of 16 october 2022.

Hi, I have been getting this error Error: Cannot convert undefined or null to object

Can't seem to understand what's problem here, Python version 3.9, Django is also latest version of 4.1.2.

Here I've attached a log from vercel

[19:19:37.832] Retrieving list of deployment files...
[19:19:44.677] Downloading 5694 deployment files...
[19:24:32.401] Looking up build cache...
[19:24:32.657] Build Cache not found
[19:24:32.760] Running "vercel build"
[19:24:33.417] Vercel CLI 28.4.10-6fa5d8b
[19:24:34.130] WARN! Due to builds existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings
[19:24:34.212] > Installing Builder: @ardnt/vercel-python-wsgi
[19:24:37.256] Starting build
[19:24:37.258] Build AMI version: Amazon Linux release 2 (Karoo)
[19:24:37.259] Lambda runtime: python3.9
[19:24:37.259] WSGI application: amancodes.wsgi.application
[19:24:37.259] ====> Selecting python version
[19:24:37.268] Found matching python (python3.9)
[19:24:37.269] ====> Installing pip
[19:24:37.269] ----> Installing pip
[19:24:37.346] Running "python3.9 get-pip.py"
[19:24:41.683] Collecting pip
[19:24:41.684] Downloading pip-22.3-py3-none-any.whl (2.1 MB)
[19:24:41.684] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 71.1 MB/s eta 0:00:00
[19:24:41.684] Collecting wheel
[19:24:41.684] Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
[19:24:41.685] Installing collected packages: wheel, pip
[19:24:41.685] Successfully installed pip-22.3 wheel-0.37.1
[19:24:41.685] ====> Downloading project
[19:24:45.179] ====> Installing handler
[19:24:45.180] ----> Installing python packages
[19:24:45.180] Running "pip install -t /tmp/5ba240c0 /vercel/path1/.vercel/builders/node_modules/@ardnt/vercel-python-wsgi"
[19:24:46.626] Processing ./.vercel/builders/node_modules/@ardnt/vercel-python-wsgi
[19:24:46.626] Preparing metadata (setup.py): started
[19:24:46.626] Preparing metadata (setup.py): finished with status 'done'
[19:24:46.627] Collecting Werkzeug==1.0.1
[19:24:46.627] Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
[19:24:46.627] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 298.6/298.6 kB 26.6 MB/s eta 0:00:00
[19:24:46.627] Building wheels for collected packages: vercel-python-wsgi
[19:24:46.628] Building wheel for vercel-python-wsgi (setup.py): started
[19:24:46.628] Building wheel for vercel-python-wsgi (setup.py): finished with status 'done'
[19:24:46.628] Created wheel for vercel-python-wsgi: filename=vercel_python_wsgi-1.1.1-py3-none-any.whl size=3891 sha256=d04be376bec741071725afc038b736e69c629bd4327dfe177b056cb5b6269b54
[19:24:46.628] Stored in directory: /vercel/.cache/pip/wheels/45/74/61/b48c4859feff53cd8f40a334dac76222c611094def81403007
[19:24:46.629] Installing collected packages: Werkzeug, vercel-python-wsgi
[19:24:46.629] Successfully installed Werkzeug-1.0.1 vercel-python-wsgi-1.1.1
[19:24:46.629] ====> Installing project requirements
[19:24:46.629] ----> Searching for "requirements.txt"
[19:24:46.629] Found global "requirements.txt"
[19:24:46.630] ----> Installing python packages
[19:24:46.630] Running "pip install -t /tmp/5ba240c0 -r /tmp/5ba240c0/requirements.txt"
[19:24:50.077] Collecting Django==4.1.2
[19:24:50.078] Downloading Django-4.1.2-py3-none-any.whl (8.1 MB)
[19:24:50.078] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.1/8.1 MB 79.5 MB/s eta 0:00:00
[19:24:50.078] Collecting asgiref<4,>=3.5.2
[19:24:50.078] Downloading asgiref-3.5.2-py3-none-any.whl (22 kB)
[19:24:50.079] Collecting sqlparse>=0.2.2
[19:24:50.079] Downloading sqlparse-0.4.3-py3-none-any.whl (42 kB)
[19:24:50.079] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.8/42.8 kB 8.2 MB/s eta 0:00:00
[19:24:50.079] Installing collected packages: sqlparse, asgiref, Django
[19:24:50.079] Successfully installed Django-4.1.2 asgiref-3.5.2 sqlparse-0.4.3
[19:24:50.080] ====> Preparing lambda bundle
[19:24:59.626] Done!
[19:24:59.628] Error: Cannot convert undefined or null to object

Please look into this matter

Dynamic web apps

This is good if we just want to display TemplateView a.k.a static website. But how can we use this to create dynamic website since Django is built primarily for dynamic ones?

ERROR: This script does not work on Python 3.6

While deploying on vercel, the build fails with error message ERROR: This script does not work on Python 3.6 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/3.6/get-pip.py instead.

I am not really sure exactly how to implement the workaround by using https://bootstrap.pypa.io/pip/3.6/get-pip.py.

Vercel build logs
2022-02-12T08:42:23.682Z  
2022-02-12T08:42:23.692Z  Retrieving list of deployment files...
2022-02-12T08:42:25.202Z  Downloading 15 deployment files...
2022-02-12T08:42:25.645Z  Analyzing source code...
2022-02-12T08:42:25.710Z  Warning: Due to `builds` existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings
2022-02-12T08:42:26.257Z  Installing build runtime...
2022-02-12T08:42:31.536Z  Build runtime installed: 5.279s
2022-02-12T08:42:32.259Z  Looking up build cache...
2022-02-12T08:42:32.798Z  Build Cache not found
2022-02-12T08:42:32.985Z  Starting build
2022-02-12T08:42:32.987Z        Build AMI version: Amazon Linux release 2 (Karoo)
2022-02-12T08:42:32.987Z        Lambda runtime: python3.6
2022-02-12T08:42:32.987Z        WSGI application: vercel_app.wsgi.application
2022-02-12T08:42:32.988Z  ====> Selecting python version
2022-02-12T08:42:32.996Z        Found matching python (python3.6)
2022-02-12T08:42:32.997Z  ====> Installing pip
2022-02-12T08:42:32.997Z  ----> Installing pip
2022-02-12T08:42:33.182Z        Running "python3.6 get-pip.py"
2022-02-12T08:42:33.243Z  ERROR Could not install pip
2022-02-12T08:42:33.245Z  Error: Command failed: python3.6 /tmp/59bdc86b/get-pip.py --user
2022-02-12T08:42:33.245Z
2022-02-12T08:42:33.246Z  ERROR: This script does not work on Python 3.6 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/3.6/get-pip.py instead.
2022-02-12T08:42:33.246Z  
2022-02-12T08:42:33.246Z      at makeError (/vercel/7aa035dc158d0642/.build-utils/.builder/node_modules/execa/index.js:174:9)
2022-02-12T08:42:33.246Z      at /vercel/7aa035dc158d0642/.build-utils/.builder/node_modules/execa/index.js:278:16
2022-02-12T08:42:33.246Z      at processTicksAndRejections (internal/process/task_queues.js:95:5)
2022-02-12T08:42:33.246Z      at async Object.downloadAndInstallPip (/vercel/7aa035dc158d0642/.build-utils/.builder/node_modules/@ardnt/vercel-python-wsgi/build-utils/pip.js:35:17)
2022-02-12T08:42:33.247Z      at async Object.exports.build (/vercel/7aa035dc158d0642/.build-utils/.builder/node_modules/@ardnt/vercel-python-wsgi/index.js:39:19)
2022-02-12T08:42:33.247Z      at async Ttt (/var/task/sandbox.js:196:7754) {
2022-02-12T08:42:33.247Z    code: 1,
2022-02-12T08:42:33.248Z    stdout: 'ERROR: This script does not work on Python 3.6 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/3.6/get-pip.py instead.\n',
2022-02-12T08:42:33.248Z    stderr: '',
2022-02-12T08:42:33.248Z    failed: true,
2022-02-12T08:42:33.248Z    signal: null,
2022-02-12T08:42:33.248Z    cmd: 'python3.6 /tmp/59bdc86b/get-pip.py --user',
2022-02-12T08:42:33.248Z    timedOut: false,
2022-02-12T08:42:33.248Z    killed: false
2022-02-12T08:42:33.249Z  }
2022-02-12T08:42:34.037Z

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.