hello i'm trying tu push a django app with heroku but there is an error let me show you my log
Décompte des objets: 931, fait.
Compression des objets: 100% (889/889), fait.
Écriture des objets: 100% (931/931), 5.10 MiB | 602.00 KiB/s, fait.
Total 931 (delta 79), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python/Django app detected
remote: -----> Preparing virtualenv version 1.7
remote: ! Virtualenv corrupt, rebuilding.
remote: Traceback (most recent call last):
remote: File "/app/tmp/buildpacks /b63c5dfcdb62db9ec6d96d0df277375e215c0a98586cc154dc2ae23edea8caeeaef96ba8ccdbdf02b5e12a89555559bff4f076afa72c36df6d52ac7c19b73605/src/virtualenv-1.7/virtualenv.py", line 2098, in <module>
remote: main()
remote: File "/app/tmp/buildpacks/b63c5dfcdb62db9ec6d96d0df277375e215c0a98586cc154dc2ae23edea8caeeaef96ba8ccdbdf02b5e12a89555559bff4f076afa72c36df6d52ac7c19b73605/src/virtualenv- 1.7/virtualenv.py", line 928, in main
remote: never_download=options.never_download)
remote: File "/app/tmp/buildpacks/b63c5dfcdb62db9ec6d96d0df277375e215c0a98586cc154dc2ae23edea8caeeaef96ba8ccdbdf02b5e12a89555559bff4f076afa72c36df6d52ac7c19b73605/src/virtualenv-1.7/virtualenv.py", line 1042, in create_environment
remote: install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
remote: File "/app/tmp/buildpacks/b63c5dfcdb62db9ec6d96d0df277375e215c0a98586cc154dc2ae23edea8caeeaef96ba8ccdbdf02b5e12a89555559bff4f076afa72c36df6d52ac7c19b73605/src/virtualenv-1.7/virtualenv.py", line 640, in install_pip
remote: filter_stdout=_filter_setup)
remote: File "/app/tmp/buildpacks/b63c5dfcdb62db9ec6d96d0df277375e215c0a98586cc154dc2ae23edea8caeeaef96ba8ccdbdf02b5e12a89555559bff4f076afa72c36df6d52ac7c19b73605/src/virtualenv-1.7/virtualenv.py", line 966, in call_subprocess
remote: cwd=cwd, env=env)
remote: File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
remote: errread, errwrite)
remote: File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
remote: raise child_exception
remote: OSError: [Errno 2] No such file or directory
remote: New python executable in ./bin/python
remote: Installing distribute.................................done.
remote: Installing pip...
remote: Error [Errno 2] No such file or directory while executing command /tmp/build_799f2de31...5ae/bin/easy_install /app/tmp/buildpacks/...ort/pip-1.0.2.tar.gz
remote: ...Installing pip...done.
remote: -----> Activating virtualenv
remote: /app/tmp/buildpacks/b63c5dfcdb62db9ec6d96d0df277375e215c0a98586cc154dc2ae23edea8caeeaef96ba8ccdbdf02b5e12a89555559bff4f076afa72c36df6d52ac7c19b73605/bin/compile: line 82: bin/activate: No such file or directory
remote: ! Push rejected, failed to compile Python/Django app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to echecetmat.
remote:
To https://git.heroku.com/echecetmat.git
! [remote rejected] master -> master (pre-receive hook declined)
error: impossible de pousser des références vers 'https://git.heroku.com/echecetmat.git'
Related
I had made a bot on python using python-telegram-bot, but I am getting an error on pushing this code on Heroku on the command line.
my whole code is on python-telegram-bot but it gives me an error on uploading this from requirements.txt
I had cut some libraries which are uploaded without any error.
My error:-
PS D:\Code\python projects\Buddy_telegram_bot> git push heroku master
Enumerating objects: 29, done.
Counting objects: 100% (29/29), done.
Delta compression using up to 8 threads
Compressing objects: 100% (26/26), done.
Writing objects: 100% (29/29), 58.49 KiB | 5.85 MiB/s, done.
Total 29 (delta 10), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/python
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote: ! Python has released a security update! Please consider upgrading to python-3.9.6
remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing python-3.9.5
remote: -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: Collecting aiohttp==3.7.4.post0
remote: Downloading aiohttp-3.7.4.post0-cp39-cp39-manylinux2014_x86_64.whl (1.4 MB)
remote: Collecting pypiwin32==223
remote: Downloading pypiwin32-223-py3-none-any.whl (1.7 kB)
remote: Collecting python-dotenv==0.18.0
remote: Downloading python_dotenv-0.18.0-py2.py3-none-any.whl (18 kB)
remote: Collecting python-telegram-bot==13.7
remote: Downloading python_telegram_bot-13.7-py3-none-any.whl (455 kB)
remote: ERROR: Could not find a version that satisfies the requirement pywin32==301 (from -r /tmp/build_f1a97cf9/requirements.txt (line 32)) (from versions: none)
remote: ERROR: No matching distribution found for pywin32==301 (from -r /tmp/build_f1a97cf9/requirements.txt (line 32))
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to buddy-telegram-bot.
remote:
To https://git.heroku.com/buddy-telegram-bot.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/buddy-telegram-bot.git'
Here I am getting an error on python-telegram-bot but I need it in my program
Please help me to solve this.
after folowwing the Get Started for Python on Heroku, I would like to add some packages which I installed locally without problems (Win10,Python 3.7).
One of these packages is pytables.
When I try to install the pytables package in heroku ,it fails with the following error: /usr/bin/ld: cannot find -lhdf5
Is there a way I can verify if HDF5 available on my dyno?
c:\Temp\python-getting-started>git push heroku master
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 301 bytes | 301.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: ! Python has released a security update! Please consider upgrading to python-3.7.1
remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing requirements with pip
remote: Collecting tables (from -r /tmp/build_2935f6f96f28f37f686b7fbf4fc38a83/requirements.txt (line 9))
remote: Downloading https://files.pythonhosted.org/packages/4d/53/8f34ce887c2a2ad80518980419a5f6f41defc85a287a355987e559ce9385/tables-3.4.4.tar.gz (4.6MB)
remote: Complete output from command python setup.py egg_info:
remote: * Using Python 3.7.0 (default, Aug 1 2018, 21:17:03)
remote: * USE_PKGCONFIG: True
remote: /tmp/H5closevpxwstk_.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
remote: main (int argc, char **argv) {
remote: ^~~~
remote: /tmp/H5closevpxwstk_.c: In function ‘main’:
remote: /tmp/H5closevpxwstk_.c:2:5: warning: implicit declaration of function ‘H5close’ [-Wimplicit-function-declaration]
remote: H5close();
remote: ^~~~~~~
remote: /usr/bin/ld: cannot find -lhdf5
remote: collect2: error: ld returned 1 exit status
remote: .. ERROR:: Could not find a local HDF5 installation.
remote: You may need to explicitly state where your local HDF5 headers and
remote: library can be found by setting the HDF5_DIR environment
remote: variable or by using the --hdf5 command-line option.
remote:
remote: ----------------------------------------
remote: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-k24wiesz/tables/
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to fierce-basin-65098.
remote:
To https://git.heroku.com/fierce-basin-65098.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/fierce-basin-65098.git'
I deleted yarn.lock and commit changes but still getting lockfiles error.
Counting objects: 24375, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (17171/17171), done.
Writing objects: 100% (24375/24375), 30.34 MiB | 1.03 MiB/s, done.
Total 24375 (delta 6150), reused 23977 (delta 5909)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Build failed
remote: ! Two different lockfiles found: package-lock.json and yarn.lock
remote:
remote: Both npm and yarn have created lockfiles for this application,
remote: but only one can be used to install dependencies. Installing
remote: dependencies using the wrong package manager can result in missing
remote: packages or subtle bugs in production.
remote:
remote: - To use npm to install your application's dependencies please delete
remote: the yarn.lock file.
remote:
remote: $ git rm yarn.lock
remote:
remote: - To use yarn to install your application's dependences please delete
remote: the package-lock.json file.
remote:
remote: $ git rm package-lock.json
remote:
remote: https://kb.heroku.com/why-is-my-node-js-build-failing-because-of-conflicting-lock-files
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to weight-tracker-react-rails.
remote:
To https://git.heroku.com/weight-tracker-react-rails.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/weight-tracker-react-rails.git
'
I'm trying to host my adonis JS project on heroku.
I followed https://medium.com/#mazinosukah/how-to-deploy-adonisjs-apps-to-heroku-66741e7cd26f and https://scotch.io/tutorials/deploying-adonisjs-apps-to-heroku but I ran into an error not described in those sites. (The webapp runs fine locally)
After running git push heroku herokuMaster:master
I get:
Counting objects: 1, done.
Writing objects: 100% (1/1), 198 bytes | 99.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote: NODE_VERBOSE=false
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): 10.13.0
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version 10.13.0...
remote: Downloading and installing node 10.13.0...
remote: Using default npm version: 6.4.1
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json)
remote: added 510 packages from 288 contributors and audited 4026 packages in 15.432s
remote: found 0 vulnerabilities
remote:
remote:
remote: -----> Caching build
remote: - node_modules
remote:
remote: -----> Pruning devDependencies
remote: audited 4026 packages in 3.961s
remote: found 0 vulnerabilities
remote:
remote:
remote: -----> Build succeeded!
remote: -----> Discovering process types
remote: Procfile declares types -> release, web
remote:
remote: -----> Compressing...
remote: Done: 24.4M
remote: -----> Launching...
remote: ! Release command declared: this new release will not be available until the command succeeds.
remote: Released v9
remote: https://myappname.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
remote: Running release command...
remote:
remote:
remote: TypeError: Cannot read property 'name' of undefined
remote:
remote:
remote: 1 _.transform
remote: /app/node_modules/#adonisjs/ace/src/Command/index.js:527
remote:
remote: 2 anonymous
remote: /app/node_modules/lodash/lodash.js:13807
remote:
remote: 3 arrayEach
remote: /app/node_modules/lodash/lodash.js:516
remote:
remote: 4 Function.transform
remote: /app/node_modules/lodash/lodash.js:13806
remote:
remote: 5 Function.commanderAction
remote: /app/node_modules/#adonisjs/ace/src/Command/index.js:526
remote:
remote: 6 Command.listener
remote: /app/node_modules/commander/index.js:315
remote:
remote: 7 Command.parseArgs
remote: /app/node_modules/commander/index.js:654
remote:
remote: 8 Command.parse
remote: /app/node_modules/commander/index.js:474
remote:
remote: 9 Kernel.invoke
remote: /app/node_modules/#adonisjs/ace/src/Kernel/index.js:329
remote:
remote: 10 Ignitor._invokeAce
remote: /app/node_modules/#adonisjs/ignitor/src/Ignitor/index.js:532
remote:
remote: 11 Ignitor.fireAce
remote: /app/node_modules/#adonisjs/ignitor/src/Ignitor/index.js:847
remote:
remote: Waiting for release.... failed.
I'm not sure why it is complaining about files in node_modules...
Any ideas? I can share more code if necessary.
I changed my Procfile contents from
release: ENV_SILENT=true node ace migration:run — force
web: ENV_SILENT=true npm start
to
web: ENV_SILENT=true npm start
The issue is a typo with the force flag. I updated the Procfile to the following and it worked:
release: ENV_SILENT=true node ace migration:run --force
web: ENV_SILENT=true npm start
i'm trying to host my website through heroku, but the build is failing constantly whatever i do.The build works locally, but when i tried to push to heroku i keep getting this
Counting objects: 1324, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (609/609), done.
Writing objects: 100% (1324/1324), 28.24 MiB | 0 bytes/s, done.
Total 1324 (delta 681), reused 1324 (delta 681)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): ^10.7
remote: engines.npm (package.json): unspecified (use default)
remote: engines.yarn (package.json): ^1.5
remote:
remote: Resolving node version ^10.7...
remote: Downloading and installing node 10.9.0...
remote: Using default npm version: 6.2.0
remote: Resolving yarn version ^1.5...
remote: Downloading and installing yarn (1.9.4)...
remote: Installed yarn 1.9.4
remote:
remote: -----> Restoring cache
remote: Skipping cache restore (not-found)
remote:
remote: -----> Building dependencies
remote: Installing node modules (yarn.lock)
remote: yarn install v1.9.4
remote: [1/4] Resolving packages...
remote: [2/4] Fetching packages...
remote: warning Pattern ["#types/koa#latest"] is trying to unpack in the same destination "/tmp/yarncache.80EhH/v2/npm-#types/koa-2.0.46-24bc3cd405d10fcde81f876cd8285
b44d4ddc3e9" as pattern ["#types/koa#*","#types/koa#*","#types/koa#*","#types/koa#*","#types/koa#*","#types/koa#*","#types/koa#*","#types/koa#*","#types/koa#*"]. This could
result in non-deterministic behavior, skipping.
remote: warning Pattern ["#types/node#latest"] is trying to unpack in the same destination "/tmp/yarncache.80EhH/v2/npm-#types/node-10.9.2-f0ab8dced5cd6c56b26765e1c0d
9e4fdcc9f2a00" as pattern ["#types/node#*","#types/node#*","#types/node#*","#types/node#*","#types/node#*","#types/node#*","#types/node#*","#types/node#*","#types/node#*","#
types/node#*","#types/node#*","#types/node#*","#types/node#*","#types/node#*","#types/node#*"]. This could result in non-deterministic behavior, skipping.
remote: warning Pattern ["koa-convert#latest"] is trying to unpack in the same destination "/tmp/yarncache.80EhH/v2/npm-koa-convert-1.2.0-da40875df49de0539098d1700b50
820cebcd21d0" as pattern ["koa-convert#^1.2.0"]. This could result in non-deterministic behavior, skipping.
remote: warning Pattern ["qs#latest"] is trying to unpack in the same destination "/tmp/yarncache.80EhH/v2/npm-qs-6.5.2-cb3ae806e8740444584ef154ce8ee98d403f3e36" as p
attern ["qs#^6.4.0"]. This could result in non-deterministic behavior, skipping.
remote: (node:257) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or
Buffer.from() methods instead.
remote: [1/4] Resolving packages...
remote: [2/4] Fetching packages...
remote: error An unexpected error occurred: "ENOENT: no such file or directory, scandir '/tmp/yarncache.80EhH/v2/npm-path-key-2.0.1-411cadb574c5a140d3a4b1910d40d80cc9
f40b40'".
remote: info If you think this is a bug, please open a bug report with the information provided in "/tmp/build_11ee5794ef73ae92c415ea71c412314f/yarn-error.log".
remote: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: If you're stuck, please submit a ticket so we can help:
remote: https://help.heroku.com/
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to sun-it-solution.
remote:
To https://git.heroku.com/sun-it-solution.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sun-it-solution.git'
i also tried to run yarn cache clean, removing all node_modules and run yarn install , but still the build fails
i'm stuck here :( i googled some other things too but i cant solve the problem please help