heroku

Could not find a version that satisfies the requirement pkg-resources==0.0.0

 ̄綄美尐妖づ 提交于 2020-07-31 16:38:27
问题 My app is deployed on heroku . When I push my code via git push heroku master . It gives me this error Collecting pkg-resources==0.0.0 (from -r requirements.txt (line 14)) remote: Could not find a version that satisfies the requirement pkg-resources==0.0.0 (from -r requirements.txt (line 14)) (from versions: ) remote: No matching distribution found for pkg-resources==0.0.0 (from -r requirements.txt (line 14)) remote: ! Push rejected, failed to compile Python app. requirement.txt amqp==2.1.1

.env file wont load variables into config.php - student setting up first php dev environment

余生长醉 提交于 2020-07-31 03:34:07
问题 Afternoon everyone, I'm a student studying Computer Science and I'm trying to recreate the environment my friend is using to host their PHP based web app. They're on a Mac using heroku local (Procfile calling heroku-php-apache2) to set up their environment. I'm on a Windows 10 PC, and from what research I'm done, heroku local is not supported in any way. So I enabled WSL installed Ubuntu 18.04 and Apache2 and, as far as I can tell, downloaded and installed all of the other components

Why my Flask backend is unstable on Heroku?

冷暖自知 提交于 2020-07-28 05:01:20
问题 I created a small backend API for a game. When a user creates a game (a request to the API is done), Python creates a new instance of this game (to be more precise, I add a game in a dict). The user gets the game id in the response and can now play (the frontend calls several routes to update the state of this game). It works perfectly locally, however on Heroku it is very unstable: I use polling and approximately 50% of the requests fail because the game id can not be found. I can't figure

Why my Flask backend is unstable on Heroku?

雨燕双飞 提交于 2020-07-28 05:01:07
问题 I created a small backend API for a game. When a user creates a game (a request to the API is done), Python creates a new instance of this game (to be more precise, I add a game in a dict). The user gets the game id in the response and can now play (the frontend calls several routes to update the state of this game). It works perfectly locally, however on Heroku it is very unstable: I use polling and approximately 50% of the requests fail because the game id can not be found. I can't figure

How to use soundfile on heroku

廉价感情. 提交于 2020-07-28 03:54:46
问题 I have a python flask app I'm running on Heroku which uses the soundfile library. After adding soundfile to requirements.txt Heroku gave me this error: raise OSError('sndfile library not found') I looked it up and read that I needed the libsndfile1 library imported. But when I added that to the requirements.txt as well, the build failed with the error: No matching distribution found for libsndfile1 Is there a workaround for importing this package so I can use soundfile on Heroku? 回答1:

How to use soundfile on heroku

|▌冷眼眸甩不掉的悲伤 提交于 2020-07-28 03:52:25
问题 I have a python flask app I'm running on Heroku which uses the soundfile library. After adding soundfile to requirements.txt Heroku gave me this error: raise OSError('sndfile library not found') I looked it up and read that I needed the libsndfile1 library imported. But when I added that to the requirements.txt as well, the build failed with the error: No matching distribution found for libsndfile1 Is there a workaround for importing this package so I can use soundfile on Heroku? 回答1:

Django 工程目录结构

天涯浪子 提交于 2020-07-26 15:46:04
Django 工程目录结构 你已经配置好你的Heroku账户(译者注:Heroku是一个老牌的免费云空间),并且创建了第一个Heroku应用,让我们来讨论一个非常重要的话题(虽然经常被忽略):Django工程结构管理。 概述 多数Django工程非常混乱。不幸的是默认的Django工程布局并没有对此有任何帮助,它过于简单对工程的管理导致在处理大的工程时带来很多维护性问题。 本文将帮助让你的工程有个合理的布局。致力于: 遵循最佳实践 让你的工程尽可能地直观--你(作为开发者)可以立即认出代码每个部分的作用 让你工程仍然保持规范随着你的工程中的应用越来越多。 让你工程在不同环境下部署更加方便 让其他程序员喜欢你的代码 具体步骤 这部分我将和你一起开始一个新的项目。过程中,你需要将你的项目目录结构调整为下面描述的布局。 本文描述了高维护性结构分明的Django项目布局的最佳实践。 基础- 缺省的Django项目 在深入之前,让我们创建一个新的Django项目(工程) $django-admin.py startproject djanolicious $cd djangolicious $tree . . ├── djangolicious │ ├── __init__.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py └── manage

蟒周刊-428-Pylance/ VSCode 全新 Python 支持扩展

穿精又带淫゛_ 提交于 2020-07-23 22:09:17
原文: PyCoder's Weekly - Issue #428 200708 Zoom.Quiet (大妈) 用时 42 分钟 完成快译 200708 Zoom.Quiet (大妈) 用时 37 分钟 完成格式转抄. 发布 Pylance: Visual Studio Code 对 Python 快速/功能丰富的语言支持 SAVANNAH OSTROWSKI Pylance is a new Python language server for VS Code based on Microsoft’s Pyright static type checking tool. With Pylance, you get type information in function signatures and when hovering on symbols, auto import suggestions, type checking diagnostics, and so much more! ( 是也乎: 官方推出更加强大的 Python 支持扩展, 更多的分析, 更多的提示, 以及更多的内存抢占.... 俺是什么 Py 支持扩展都不安装的. ) Python 异步框架:超越开发者部落 TOM CHRISTIE In light of some recent and, at

Images disappearing in heroku even after storing them in S3 bucket

*爱你&永不变心* 提交于 2020-07-23 08:01:11
问题 I'm using sqlite3 as my database , i.e., the django default database. I am told Heroku is ephemeral. So the images stored will be vaporized. So I used Amazon S3 bucket for storing all my static files and the images uploaded via django admin . Still the images that I upload via django admin gets disappeared after couple of hours. In my settings.py : DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } AWS_ACCESS_KEY_ID = ** AWS

Tying a unique game id to a user in a Flask app to handle multiple requests to the server

三世轮回 提交于 2020-07-23 07:41:26
问题 I built a chess app with Python and used Flask to create a site for users to play on. I used Heroku to deploy the app (http://pythonchessapp.herokuapp.com/). I am new to web development and was wondering how I can handle multiple users (on separate laptops or tabs) going on the site to play the app? Something like having a unique game id per user to serve a different game to different requests. Below is some of my code for routes and initializing games. I basically initialize a Board object