Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heroku one-click deployment fails #33

Open
xetapi opened this issue Jun 29, 2020 · 2 comments
Open

Heroku one-click deployment fails #33

xetapi opened this issue Jun 29, 2020 · 2 comments

Comments

@xetapi
Copy link

xetapi commented Jun 29, 2020

Not sure if you're still supporting this (but I think it's the only thing out there I can find that bulk uploads tags on Monzo)

  • Thanks

Log Attached:
-----> Python app detected
cp: cannot stat '/tmp/build_71a73a7205f85da37d3fbac877338162/requirements.txt': No such file or directory
-----> Installing python-3.6.10
-----> Installing pip
-----> Installing dependencies with Pipenv 2018.5.18…
Installing -e git+git://github.com/samdobson/monzo-python.git#egg=monzo-python…
Obtaining monzo-python from git+git://github.com/samdobson/monzo-python.git#egg=monzo-python
Cloning git://github.com/samdobson/monzo-python.git to ./src/monzo-python
Collecting requests (from monzo)
Downloading https://files.pythonhosted.org/packages/45/1e/0c169c6a5381e241ba7404532c16a21d86ab872c9bed8bdcd4c423954103/requests-2.24.0-py2.py3-none-any.whl (61kB)
Collecting python-dotenv (from monzo)
Downloading https://files.pythonhosted.org/packages/cb/2a/07f87440444fdf2c5870a710b6770d766a1c7df9c827b0c90e807f1fb4c5/python_dotenv-0.13.0-py2.py3-none-any.whl
Collecting chardet<4,>=3.0.2 (from requests->monzo)
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->monzo)
Downloading https://files.pythonhosted.org/packages/e1/e5/df302e8017440f111c11cc41a6b432838672f5a70aa29227bf58149dc72f/urllib3-1.25.9-py2.py3-none-any.whl (126kB)
Requirement already satisfied: certifi>=2017.4.17 in ./.heroku/python/lib/python3.6/site-packages (from requests->monzo)
Collecting idna<3,>=2.5 (from requests->monzo)
Downloading https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl (58kB)
Installing collected packages: chardet, urllib3, idna, requests, python-dotenv, monzo
Running setup.py develop for monzo
Successfully installed chardet-3.0.4 idna-2.10 monzo python-dotenv-0.13.0 requests-2.24.0 urllib3-1.25.9

   Adding -e git+git://github.com/samdobson/monzo-python.git#egg=monzo-python to Pipfile's [packages]…
   Creating a virtualenv for this project…
   Using /app/.heroku/python/bin/python (3.6.10) to create virtualenv…
   created virtual environment CPython3.6.10.final.0-64 in 1742ms
     creator CPython3Posix(dest=/app/.local/share/virtualenvs/build_71a73a7205f85da37d3fbac877338162-xXyzOdlZ, clear=False, global=False)
     seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/app/.local/share/virtualenv)
       added seed packages: pip==20.1.1, setuptools==47.3.1, wheel==0.34.2
     activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
   
   Virtualenv location: /app/.local/share/virtualenvs/build_71a73a7205f85da37d3fbac877338162-xXyzOdlZ
   Installing dependencies from Pipfile.lock (670b6f)…
   An error occurred while installing -e git+git://github.com/samdobson/monzo-python.git@833a2cfc577144c3d69bcfe444c0a4aa5d624bd6#egg=monzo-python! Will try again.
   Installing initially–failed dependencies…
   Success installing -e git+git://github.com/samdobson/monzo-python.git@833a2cfc577144c3d69bcfe444c0a4aa5d624bd6#egg=monzo-python!

-----> Installing SQLite3
-----> $ python manage.py collectstatic --noinput
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line
utility.execute()
File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/init.py", line 357, in execute
django.setup()
File "/app/.heroku/python/lib/python3.6/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/app/.heroku/python/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/auth/models.py", line 2, in
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/auth/base_user.py", line 47, in
class AbstractBaseUser(models.Model):
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/base.py", line 117, in new
new_class.add_to_class('_meta', Options(meta, app_label))
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/base.py", line 321, in add_to_class
value.contribute_to_class(cls, name)
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/options.py", line 204, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/init.py", line 28, in getattr
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/utils.py", line 201, in getitem
backend = load_backend(db['ENGINE'])
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/utils.py", line 110, in load_backend
return import_module('%s.base' % backend_name)
File "/app/.heroku/python/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 43, in
from .operations import DatabaseOperations # NOQA isort:skip
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/postgresql/operations.py", line 5, in
from django.db.backends.base.operations import BaseDatabaseOperations
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/base/operations.py", line 5, in
import sqlparse
ModuleNotFoundError: No module named 'sqlparse'
! Error while running '$ python manage.py collectstatic --noinput'.
See traceback above for details.
You may need to update application code to resolve this error.
Or, you can disable collectstatic for this application:
$ heroku config:set DISABLE_COLLECTSTATIC=1
https://devcenter.heroku.com/articles/django-assets
! Push rejected, failed to compile Python app.
! Push failed

@samdobson
Copy link
Owner

samdobson commented Jun 29, 2020

Hey. Thanks for reaching out, and sorry this isn't working. I thought this was a really cool idea, but as you noticed, it never really gained much traction, so hasn't received much attention.

At the time, I remember there was an issue (#4) in the Monzo app itself with actually displaying the updated notes. The Monzo API itself has never had much love itself, and I don't know if that ever got fixed.

I had to create my own fork of the monzo-python library because to support tag updates. The problem may even be there. The rabbit hole runs deep...

And now the more positive part:

The entire app is effectively a wrapper around a single API function to update the "notes" property of transactions meeting user-defined criteria: https://docs.monzo.com/#annotate-transaction

If you're looking for a quick way to bulk upload tags, I would write a quick and dirty script to do that (it is likely to be faster than unpicking this mess!)

@xetapi
Copy link
Author

xetapi commented Jun 29, 2020

Thanks for the quick reply. Considering it's still the only thing I could find that can do bulk updates it's still a really good idea. Maybe one that Monzo will be addressing in their soon to be released paid for accounts.

I did go down a bit of a rabbit hole looking into the dependencies and tried building locally but eventually got stuck at a password, let me in screen'.

I'll admit creating a script that does this myself would be a bit out of my league, but thanks for your help anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants