import Torrent
my_torrent = Torrent()
my_torrent.add("C:\test.txt")
my_torrent.save("C:\test.torrent")
link = get_link("C:\test.torrent")
# вернет магнитную ссылку
print(link)
link.save("C:\test2.torrent")
за тебя погуглить?
серьезно, даже такое для тебя проблема?
2020-08-30T14:00:08.895830+00:00 heroku[web.1]: State changed from crashed to starting
2020-08-30T14:00:13.980569+00:00 heroku[web.1]: Starting process with command `gunicorn myfist.wsgi --log-file -`
2020-08-30T14:00:16.942550+00:00 app[web.1]: [2020-08-30 14:00:16 +0000] [4] [INFO] Starting gunicorn 20.0.4
2020-08-30T14:00:16.943338+00:00 app[web.1]: [2020-08-30 14:00:16 +0000] [4] [INFO] Listening at: 0.0.0.0:29432 (4)
2020-08-30T14:00:16.943471+00:00 app[web.1]: [2020-08-30 14:00:16 +0000] [4] [INFO] Using worker: sync
2020-08-30T14:00:16.949292+00:00 app[web.1]: [2020-08-30 14:00:16 +0000] [10] [INFO] Booting worker with pid: 10
2020-08-30T14:00:16.956624+00:00 app[web.1]: [2020-08-30 14:00:16 +0000] [10] [ERROR] Exception in worker process
2020-08-30T14:00:16.956626+00:00 app[web.1]: Traceback (most recent call last):
2020-08-30T14:00:16.956646+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2020-08-30T14:00:16.956648+00:00 app[web.1]: worker.init_process()
2020-08-30T14:00:16.956648+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process
2020-08-30T14:00:16.956648+00:00 app[web.1]: self.load_wsgi()
2020-08-30T14:00:16.956649+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2020-08-30T14:00:16.956650+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2020-08-30T14:00:16.956650+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2020-08-30T14:00:16.956651+00:00 app[web.1]: self.callable = self.load()
2020-08-30T14:00:16.956651+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2020-08-30T14:00:16.956652+00:00 app[web.1]: return self.load_wsgiapp()
2020-08-30T14:00:16.956652+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2020-08-30T14:00:16.956652+00:00 app[web.1]: return util.import_app(self.app_uri)
2020-08-30T14:00:16.956653+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app
2020-08-30T14:00:16.956653+00:00 app[web.1]: mod = importlib.import_module(module)
2020-08-30T14:00:16.956653+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/importlib/__init__.py", line 127, in import_module
2020-08-30T14:00:16.956654+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2020-08-30T14:00:16.956654+00:00 app[web.1]: File "", line 1006, in _gcd_import
2020-08-30T14:00:16.956655+00:00 app[web.1]: File "", line 983, in _find_and_load
2020-08-30T14:00:16.956655+00:00 app[web.1]: File "", line 953, in _find_and_load_unlocked
2020-08-30T14:00:16.956655+00:00 app[web.1]: File "", line 219, in _call_with_frames_removed
2020-08-30T14:00:16.956656+00:00 app[web.1]: File "", line 1006, in _gcd_import
2020-08-30T14:00:16.956656+00:00 app[web.1]: File "", line 983, in _find_and_load
2020-08-30T14:00:16.956656+00:00 app[web.1]: File "", line 965, in _find_and_load_unlocked
2020-08-30T14:00:16.956657+00:00 app[web.1]: ModuleNotFoundError: No module named 'myfist'
2020-08-30T14:00:16.956861+00:00 app[web.1]: [2020-08-30 14:00:16 +0000] [10] [INFO] Worker exiting (pid: 10)
2020-08-30T14:00:17.014089+00:00 app[web.1]: [2020-08-30 14:00:17 +0000] [11] [INFO] Booting worker with pid: 11
2020-08-30T14:00:17.028453+00:00 app[web.1]: [2020-08-30 14:00:17 +0000] [11] [ERROR] Exception in worker process
2020-08-30T14:00:17.028455+00:00 app[web.1]: Traceback (most recent call last):
2020-08-30T14:00:17.028456+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2020-08-30T14:00:17.028457+00:00 app[web.1]: worker.init_process()
2020-08-30T14:00:17.028457+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process
2020-08-30T14:00:17.028458+00:00 app[web.1]: self.load_wsgi()
2020-08-30T14:00:17.028458+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2020-08-30T14:00:17.028459+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2020-08-30T14:00:17.028459+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2020-08-30T14:00:17.028460+00:00 app[web.1]: self.callable = self.load()
2020-08-30T14:00:17.028460+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2020-08-30T14:00:17.028461+00:00 app[web.1]: return self.load_wsgiapp()
2020-08-30T14:00:17.028461+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2020-08-30T14:00:17.028461+00:00 app[web.1]: return util.import_app(self.app_uri)
2020-08-30T14:00:17.028462+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app
2020-08-30T14:00:17.028462+00:00 app[web.1]: mod = importlib.import_module(module)
2020-08-30T14:00:17.028463+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/importlib/__init__.py", line 127, in import_module
2020-08-30T14:00:17.028463+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2020-08-30T14:00:17.028464+00:00 app[web.1]: File "", line 1006, in _gcd_import
2020-08-30T14:00:17.028464+00:00 app[web.1]: File "", line 983, in _find_and_load
2020-08-30T14:00:17.028464+00:00 app[web.1]: File "", line 953, in _find_and_load_unlocked
2020-08-30T14:00:17.028465+00:00 app[web.1]: File "", line 219, in _call_with_frames_removed
2020-08-30T14:00:17.028465+00:00 app[web.1]: File "", line 1006, in _gcd_import
2020-08-30T14:00:17.028466+00:00 app[web.1]: File "", line 983, in _find_and_load
2020-08-30T14:00:17.028466+00:00 app[web.1]: File "", line 965, in _find_and_load_unlocked
2020-08-30T14:00:17.028467+00:00 app[web.1]: ModuleNotFoundError: No module named 'myfist'
2020-08-30T14:00:17.028793+00:00 app[web.1]: [2020-08-30 14:00:17 +0000] [11] [INFO] Worker exiting (pid: 11)
2020-08-30T14:00:17.135517+00:00 app[web.1]: [2020-08-30 14:00:17 +0000] [4] [INFO] Shutting down: Master
2020-08-30T14:00:17.135762+00:00 app[web.1]: [2020-08-30 14:00:17 +0000] [4] [INFO] Reason: Worker failed to boot.
2020-08-30T14:00:17.263710+00:00 heroku[web.1]: Process exited with status 3
2020-08-30T14:00:17.339367+00:00 heroku[web.1]: State changed from starting to crashed
2020-08-30T14:00:18.000000+00:00 app[api]: Build succeeded
2020-08-30T14:01:05.766286+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=sheltered-reef-33234.herokuapp.com request_id=0c2820c9-774c-4b3d-86c4-c53e2531f986 fwd="188.163.103.167" dyno= connect= service= status=503 bytes= protocol=https
2020-08-30T14:01:06.363461+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=sheltered-reef-33234.herokuapp.com request_id=b16b581b-fce7-4dce-bfdd-8707f4ec2433 fwd="188.163.103.167" dyno= connect= service= status=503 bytes= protocol=https
D:>heroku login
heroku: Press any key to open up the browser to login or q to exit:
Opening browser to https://cli-auth.heroku.com/auth/
Logging in... done
Logged in asadmin@gmail.com
D:>heroku create myprogect3
Creating ⬢ myprogect3... done
https://myprogect3.herokuapp.com/ | https://git.heroku.com/myprogect3.git
D:>heroku buildpacks:set heroku/python
Buildpack set. Next release on myprogect3 will use heroku/python.
Run git push heroku main to create a new release using this buildpack.
D:>git push heroku main
error: src refspec main does not match any
error: failed to push some refs to 'https://git.heroku.com/myprogect3.git'
D:>cd D:\new_git3\
D:\new_git3>git add -A
D:\new_git3>git commit -m "heroksdguddsd"
[master 8283f81] heroksdguddsd
19 files changed, 255 insertions(+)
create mode 100644 .gitignore
create mode 100644 Procfile
create mode 100644 manage.py
create mode 100644 myfirst/__init__.py
create mode 100644 myfirst/asgi.py
create mode 100644 myfirst/settings.py
create mode 100644 myfirst/urls.py
create mode 100644 myfirst/wsgi.py
create mode 100644 pages/__init__.py
create mode 100644 pages/admin.py
create mode 100644 pages/apps.py
create mode 100644 pages/migrations/__init__.py
create mode 100644 pages/models.py
create mode 100644 pages/tests.py
create mode 100644 pages/urls.py
create mode 100644 pages/views.py
create mode 100644 reqirements.txt
create mode 100644 runtime.txt
create mode 100644 templates/page.html
D:\new_git3>git remote -v
heroku https://git.heroku.com/myprogect3.git (fetch)
heroku https://git.heroku.com/myprogect3.git (push)
origin https://github.com/dj11moon/mysite2.git (fetch)
origin https://github.com/dj11moon/mysite2.git (push)
D:\new_git3>git push heroku master
Enumerating objects: 26, done.
Counting objects: 100% (26/26), done.
Delta compression using up to 8 threads
Compressing objects: 100% (17/17), done.
Writing objects: 100% (26/26), 4.71 KiB | 253.00 KiB/s, done.
Total 26 (delta 1), reused 3 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to myprogect3.
remote:
To https://git.heroku.com/myprogect3.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/myprogect3.git'
D:>heroku login
heroku: Press any key to open up the browser to login or q to exit:
Opening browser to https://cli-auth.heroku.com/auth/
Logging in... done
Logged in as admin@gmail.com
D:>git clone https://github.com/mysite2.git
Cloning into 'mysite2'...
remote: Enumerating objects: 26, done.
remote: Counting objects: 100% (26/26), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 26 (delta 1), reused 23 (delta 1), pack-reused 0
Receiving objects: 100% (26/26), 4.71 KiB | 803.00 KiB/s, done.
Resolving deltas: 100% (1/1), done.
D:>cd D:\mysite2\
D:\mysite2>heroku create myfoll2
Creating ⬢ myfoll2... done
https://myfoll2.herokuapp.com/ | https://git.heroku.com/myfoll2.git
D:\mysite2>git push heroku master
Enumerating objects: 26, done.
Counting objects: 100% (26/26), done.
Delta compression using up to 8 threads
Compressing objects: 100% (16/16), done.
Writing objects: 100% (26/26), 4.71 KiB | 1.57 MiB/s, done.
Total 26 (delta 1), reused 26 (delta 1), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! No default language could be detected for this app.
remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to myfoll2.
remote:
To https://git.heroku.com/myfoll2.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/myfoll2.git'
python-3.7.6
Enumerating objects: 50, done.
Counting objects: 100% (50/50), done.
Delta compression using up to 8 threads
Compressing objects: 100% (42/42), done.
Writing objects: 100% (50/50), 14.01 KiB | 421.00 KiB/s, done.
Total 50 (delta 10), reused 3 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildp...
remote: More info: https://devcenter.heroku.com/articles/buildpacks#d...
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to shielded-bastion-00322.
remote:
To https://git.heroku.com/shielded-bastion-00322.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/shielded-bastion-00322.git'
так лучше?