eddys@PI5:/mnt/nvme_ssd/Aussie_projects $ pip check
No broken requirements found.
eddys@PI5:/mnt/nvme_ssd/Aussie_projects $ pip list -o
Package Version Latest Type
---------------------------------- ---------- ------------------ -----
anyio 3.6.2 4.9.0 wheel
asgiref 3.8.1 3.9.1 wheel
astroid 2.14.2 3.3.11 wheel
asttokens 2.2.1 3.0.0 wheel
attrs 22.2.0 25.3.0 wheel
Authlib 1.6.0 1.6.1 wheel
av 12.3.0 15.0.0 wheel
azure-identity 1.23.0 1.23.1 wheel
azure-mgmt-resource 23.4.0 24.0.0 wheel
beautifulsoup4 4.11.2 4.13.4 wheel
boto3 1.38.46 1.39.11 wheel
botocore 1.38.46 1.39.11 wheel
cachetools 5.5.2 6.1.0 wheel
certifi 2022.9.24 2025.7.14 wheel
chardet 5.1.0 5.2.0 wheel
charset-normalizer 3.0.1 3.4.2 wheel
click 8.1.3 8.2.1 wheel
dbus-python 1.3.2 1.4.0 sdist
dill 0.3.6 0.4.0 wheel
distro 1.8.0 1.9.0 wheel
Django 5.2.3 5.2.4 wheel
docutils 0.19 0.21.2 wheel
h2 4.1.0 4.2.0 wheel
hpack 4.0.0 4.1.0 wheel
httpcore 0.16.3 1.0.9 wheel
httpx 0.23.3 0.28.1 wheel
hyperframe 6.0.0 6.1.0 wheel
idna 3.3 3.10 wheel
importlib-metadata 4.12.0 8.7.0 wheel
isort 5.6.4 6.0.1 wheel
jedi 0.18.2 0.19.2 wheel
Jinja2 3.1.2 3.1.6 wheel
jsonpointer 2.3 3.0.0 wheel
jsonschema 4.10.3 4.25.0 wheel
lazy-object-proxy 1.9.0 1.11.0 wheel
libarchive-c 2.9 5.3 wheel
libevdev 0.5 0.12 sdist
logilab-common 1.9.8 2.1.0 wheel
lxml 4.9.2 6.0.0 wheel
Markdown 3.4.1 3.8.2 wheel
MarkupSafe 2.1.2 3.0.2 wheel
meson 1.5.1 1.8.2 wheel
more-itertools 8.10.0 10.7.0 wheel
msal 1.32.3 1.33.0 wheel
mypy 1.0.1 1.17.0 wheel
mypy-extensions 0.4.3 1.1.0 wheel
numpy 1.24.2 2.3.1 wheel
oauthlib 3.2.2 3.3.1 wheel
olefile 0.46 0.47 wheel
parso 0.8.3 0.8.4 wheel
pexpect 4.8.0 4.9.0 wheel
pgzero 1.2 1.2.1 wheel
Pillow 9.4.0 11.3.0 wheel
pip 23.0.1 25.1.1 wheel
platformdirs 2.6.0 4.3.8 wheel
pycairo 1.20.1 1.28.0 sdist
pycryptodomex 3.11.0 3.23.0 wheel
pycups 2.0.1 2.0.4 sdist
pygame 2.1.2 2.6.1 wheel
Pygments 2.14.0 2.19.2 wheel
PyGObject 3.42.2 3.52.3 sdist
PyJWT 2.6.0 2.10.1 wheel
pylint 2.16.2 3.3.7 wheel
PyOpenGL 3.1.6 3.1.9 wheel
pyOpenSSL 23.0.0 25.1.0 wheel
PyQt5 5.15.9 5.15.11 sdist
PyQt5-sip 12.11.1 12.17.0 sdist
pyrsistent 0.18.1 0.20.0 wheel
pysmbc 1.0.23 1.0.25.1 sdist
python-dotenv 0.21.0 1.1.1 wheel
pyudev 0.24.0 0.24.3 wheel
PyYAML 6.0 6.0.2 wheel
reportlab 3.6.12 4.4.2 wheel
requests 2.28.1 2.32.4 wheel
requests-oauthlib 1.3.0 2.0.0 wheel
requests-toolbelt 0.10.1 1.0.0 wheel
responses 0.18.0 0.25.7 wheel
rfc3986 1.5.0 2.0.0 wheel
roman 3.3 5.1 wheel
s3transfer 0.13.0 0.13.1 wheel
Send2Trash 1.8.1b0 1.8.3 wheel
setuptools 66.1.1 80.9.0 wheel
simplejpeg 1.8.1 1.8.2 wheel
simplejson 3.18.3 3.20.1 wheel
six 1.16.0 1.17.0 wheel
smbus2 0.4.2 0.5.0 wheel
sniffio 1.2.0 1.3.1 wheel
soupsieve 2.3.2 2.7 wheel
spidev 3.5 3.7 sdist
sqlparse 0.4.2 0.5.3 wheel
ssh-import-id 5.10 5.11 wheel
thonny 4.1.4 4.1.7 wheel
tomlkit 0.11.7 0.13.3 wheel
tqdm 4.64.1 4.67.1 wheel
twython 3.8.2 3.9.1 wheel
types-aiofiles 22.1 24.1.0.20250708 wheel
types-annoy 1.17 1.17.8.4 wheel
types-appdirs 1.4 1.4.3.5 wheel
types-aws-xray-sdk 2.10 2.14.0.20250708 wheel
types-babel 2.11 2.11.0.15 wheel
types-backports.ssl-match-hostname 3.7 3.7.4.4 wheel
types-beautifulsoup4 4.11 4.12.0.20250516 wheel
types-bleach 5.0 6.2.0.20250514 wheel
types-boto 2.49 2.49.18.20241019 wheel
types-braintree 4.17 4.37.0.20250701 wheel
types-cachetools 5.2 6.1.0.20250717 wheel
types-caldav 0.10 1.3.0.20250516 wheel
types-certifi 2021.10.8 2021.10.8.3 wheel
types-cffi 1.15 1.17.0.20250523 wheel
types-chardet 5.0 5.0.4.6 wheel
types-chevron 0.14 0.14.2.20250103 wheel
types-click-spinner 0.1 0.1.13.20250510 wheel
types-colorama 0.4 0.4.15.20240311 wheel
types-commonmark 0.9 0.9.2.20250330 wheel
types-console-menu 0.7 0.8.0.20250326 wheel
types-contextvars 2.4 2.4.7.3 wheel
types-croniter 1.3 6.0.0.20250626 wheel
types-cryptography 3.3 3.3.23.2 wheel
types-D3DShot 0.1 0.1.0.5 wheel
types-dateparser 1.1 1.2.2.20250627 wheel
types-DateTimeRange 1.2 2.0.0.6 wheel
types-decorator 5.1 5.2.0.20250324 wheel
types-Deprecated 1.2 1.2.15.20250304 wheel
types-dj-database-url 1.0 1.3.0.4 wheel
types-docopt 0.6 0.6.11.20241107 wheel
types-docutils 0.19 0.21.0.20250722 wheel
types-editdistance 0.6 0.8.0.20250401 wheel
types-emoji 2.1 2.1.0.3 wheel
types-entrypoints 0.4 0.4.1.20240106 wheel
types-first 2.0 2.0.5.20240806 wheel
types-flake8-2020 1.7 1.8.0.20240818 wheel
types-flake8-bugbear 22.10.27 24.12.12.20250416 wheel
types-flake8-builtins 2.0 2.5.0.20250415 wheel
types-flake8-docstrings 1.6 1.7.0.20250425 wheel
types-flake8-plugin-utils 1.3 1.3.7.5 wheel
types-flake8-rst-docstrings 0.2 0.3.0.20250425 wheel
types-flake8-simplify 0.19 0.22.0.20250708 wheel
types-flake8-typing-imports 1.14 1.16.0.20250708 wheel
types-Flask-Cors 3.0 6.0.0.20250520 wheel
types-Flask-SQLAlchemy 2.5 2.5.9.4 wheel
types-fpdf2 2.5 2.8.3.20250516 wheel
types-gdb 12.1 15.0.0.20250713 wheel
types-google-cloud-ndb 1.11 2.3.0.20250317 wheel
types-hdbcli 2.14 2.25.0.20250715 wheel
types-html5lib 1.1 1.1.11.20250708 wheel
types-httplib2 0.21 0.22.0.20250622 wheel
types-humanfriendly 10.0 10.0.1.20250319 wheel
types-invoke 1.7 2.0.0.10 wheel
types-JACK-Client 0.5 0.5.10.20250401 wheel
types-jmespath 1.0 1.0.2.20250711 wheel
types-jsonschema 4.17 4.25.0.20250720 wheel
types-keyboard 0.13 0.13.2.20240310 wheel
types-ldap3 2.9 2.9.13.20250622 wheel
types-Markdown 3.4 3.8.0.20250708 wheel
types-mock 4.0 5.2.0.20250516 wheel
types-mypy-extensions 0.4 1.1.0.20250425 wheel
types-mysqlclient 2.1 2.2.0.20250516 wheel
types-oauthlib 3.2 3.3.0.20250708 wheel
types-openpyxl 3.0 3.1.5.20250602 wheel
types-opentracing 2.4 2.4.10.20250622 wheel
types-paho-mqtt 1.6 1.6.0.20240321 wheel
types-paramiko 2.11 3.5.0.20250708 wheel
types-parsimonious 0.10 0.10.0.20240331 wheel
types-passlib 1.7 1.7.7.20250602 wheel
types-passpy 1.0 1.0.2.4 wheel
types-peewee 3.15 3.18.2.20250710 wheel
types-pep8-naming 0.13 0.15.0.20250501 wheel
types-Pillow 9.3 10.2.0.20240822 wheel
types-playsound 1.3 1.3.1.20241019 wheel
types-polib 1.1 1.2.0.20250401 wheel
types-prettytable 3.4 3.4.2.6 wheel
types-protobuf 3.20 6.30.2.20250703 wheel
types-psutil 5.9 7.0.0.20250601 wheel
types-psycopg2 2.9 2.9.21.20250718 wheel
types-pyaudio 0.2 0.2.16.20240516 wheel
types-PyAutoGUI 0.9 0.9.3.20241230 wheel
types-pycurl 7.45 7.45.6.20250309 wheel
types-pyfarmhash 0.3 0.4.0.20240902 wheel
types-pyflakes 2.5 3.4.0.20250701 wheel
types-Pygments 2.13 2.19.0.20250715 wheel
types-pyinstaller 5.6 6.14.0.20250611 wheel
types-PyMySQL 1.0 1.1.0.20250711 wheel
types-pynput 1.7 1.8.1.20250318 wheel
types-pyOpenSSL 22.1 24.1.0.20240722 wheel
types-pyRFC3339 1.1 2.0.1.20241107 wheel
types-PyScreeze 0.1 1.0.1.20250425 wheel
types-pysftp 0.2 0.2.17.20241117 wheel
types-pytest-lazy-fixture 0.6 0.6.3.20240707 wheel
types-python-crontab 2.6 3.3.0.20250715 wheel
types-python-dateutil 2.8 2.9.0.20250708 wheel
types-python-gflags 3.1 3.1.7.20241205 wheel
types-python-jose 3.3 3.5.0.20250531 wheel
types-python-nmap 0.7 0.7.1.20240106 wheel
types-python-slugify 6.1 8.0.2.20240310 wheel
types-pytz 2022.6 2025.2.0.20250516 wheel
types-pyvmomi 7.0 8.0.0.6 wheel
types-pywin32 304 311.0.0.20250723 wheel
types-PyYAML 6.0 6.0.12.20250516 wheel
types-redis 4.3 4.6.0.20241004 wheel
types-regex 2022.10.31 2024.11.6.20250403 wheel
types-requests 2.28 2.32.4.20250611 wheel
types-retry 0.9 0.9.9.20250322 wheel
types-Send2Trash 1.8 1.8.2.7 wheel
types-setuptools 65.5 80.9.0.20250529 wheel
types-simplejson 3.17 3.20.0.20250326 wheel
types-singledispatch 3.7 4.1.0.20250326 wheel
types-six 1.16 1.17.0.20250515 wheel
types-slumber 0.7 0.7.3.20250622 wheel
types-SQLAlchemy 1.4.43 1.4.53.38 wheel
types-stdlib-list 0.8 0.8.3.4 wheel
types-stripe 3.5 3.5.2.20240106 wheel
types-tabulate 0.9 0.9.0.20241207 wheel
types-termcolor 1.1 1.1.6.2 wheel
types-toml 0.10 0.10.8.20240310 wheel
types-toposort 1.7 1.10.0.20250401 wheel
types-tqdm 4.64 4.67.0.20250516 wheel
types-tree-sitter 0.20 0.20.1.20240311 wheel
types-tree-sitter-languages 1.5 1.10.0.20250530 wheel
types-ttkthemes 3.2 3.2.4.20250426 wheel
types-typed-ast 1.5 1.5.8.7 wheel
types-tzlocal 4.2 5.1.0.1 wheel
types-ujson 5.5 5.10.0.20250326 wheel
types-urllib3 1.26 1.26.25.14 wheel
types-vobject 0.9 0.9.9.20250708 wheel
types-waitress 2.1 3.0.1.20241117 wheel
types-whatthepatch 1.0 1.0.2.20250401 wheel
types-xmltodict 0.13 0.14.0.20241009 wheel
types-xxhash 3.0 3.0.5.2 wheel
types-zxcvbn 4.4 4.5.0.20250223 wheel
typing_extensions 4.14.0 4.14.1 wheel
uritemplate 4.1.1 4.2.0 wheel
webcolors 1.11.1 24.11.1 wheel
wheel 0.38.4 0.45.1 wheel
wrapt 1.14.1 1.17.2 wheel
zipp 1.0.0 3.23.0 wheel
Please post the contents of this migration file:
As you will notice I have to edit the migration file because django got confused at a certain time. The fields in Tshirt table already exist, migration file 0012 has been removed. (started all over again)
# Generated by Django 5.2.3 on 2025-07-23 11:37
import django.contrib.auth.models
import django.db.models.deletion
import django.db.models.functions.text
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
# ('auth', '0012_alter_user_first_name_max_length'),
('tshirts', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='AussieCities',
fields=[
('name', models.CharField(max_length=200, primary_key=True, serialize=False)),
('display_name', models.CharField(max_length=200)),
],
options={
'db_table': 'aussie_cities',
'managed': False,
},
),
migrations.CreateModel(
name='AussieRegions',
fields=[
('name', models.CharField(max_length=200, primary_key=True, serialize=False)),
('display_name', models.CharField(max_length=200)),
],
options={
'db_table': 'aussie_regions',
'managed': False,
},
),
migrations.CreateModel(
name='Brand',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('brand_name', models.CharField(max_length=100)),
],
),
migrations.CreateModel(
name='CustomPermission',
fields=[
('permission_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='auth.permission')),
],
bases=('auth.permission',),
managers=[
('objects', django.contrib.auth.models.PermissionManager()),
],
),
migrations.CreateModel(
name='CustomUser',
fields=[
('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
('e_mail', models.EmailField(max_length=254, unique=True)),
('is_admin', models.BooleanField(default=False)),
],
options={
'verbose_name': 'user',
'verbose_name_plural': 'users',
'abstract': False,
},
bases=('auth.user',),
managers=[
('objects', django.contrib.auth.models.UserManager()),
],
),
# migrations.AddField(
# model_name='tshirts',
# name='tshirt_LowStock',
# field=models.BooleanField(default=True, verbose_name='Low stock'),
# ),
# migrations.AddField(
# model_name='tshirts',
# name='tshirt_OutOfStock',
# field=models.BooleanField(default=True, verbose_name='Out of stock'),
# ),
migrations.AlterField(
model_name='tshirts',
name='tshirt_brand',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='tshirts.brand', verbose_name='T-shirt made by'),
),
migrations.CreateModel(
name='BrandAvailableColors',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('brand_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tshirts.brand')),
('color_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tshirts.colors')),
],
),
migrations.CreateModel(
name='Cart',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Customer',
fields=[
('customer_id', models.AutoField(primary_key=True, serialize=False)),
('first_name', models.CharField(max_length=100)),
('last_name', models.CharField(max_length=100)),
('full_name', models.GeneratedField(db_persist=True, expression=django.db.models.functions.text.Concat(models.F('first_name'), models.Value(' '), models.F('last_name')), output_field=models.CharField(max_length=201), verbose_name='Full name')),
('email', models.EmailField(help_text='unique E-mail address of the customer', max_length=254, unique=True, verbose_name='E-mail address')),
('phone_number', models.CharField(blank=True, max_length=20, null=True, verbose_name='Cell phone number')),
('address_line_1', models.CharField(blank=True, max_length=255, null=True)),
('address_line_2', models.CharField(blank=True, max_length=255, null=True)),
('postal_code', models.CharField(blank=True, max_length=20, null=True)),
('date_added', models.DateField(auto_now_add=True)),
('date_last_modified', models.DateField(auto_now=True)),
('is_active', models.BooleanField(default=True, verbose_name='Active')),
('company_name', models.CharField(blank=True, max_length=100, null=True)),
('tax_number', models.CharField(blank=True, max_length=20, null=True)),
('country_id', models.CharField(default='Australia', max_length=100)),
('city', models.CharField(max_length=100)),
('state_province', models.CharField(max_length=100)),
('user_id', models.ForeignKey(blank=True, help_text='Coupled user (when relevant)', null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'Customer',
'verbose_name_plural': 'Customers',
'ordering': ['last_name', 'first_name'],
},
),
migrations.CreateModel(
name='OrderItem',
fields=[
('orderitem_id', models.AutoField(primary_key=True, serialize=False)),
('item_description', models.CharField(blank=True, help_text='Description of the finished product', max_length=200, null=True)),
('tshirt_total_price', models.DecimalField(decimal_places=2, max_digits=5)),
('print_1', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='orderitem_as_print_1', to='tshirts.availableprints', verbose_name='Print front')),
('print_2', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='orderitem_as_print_2', to='tshirts.availableprints', verbose_name='Print back')),
('tshirt', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='orderitem_as_tshirt', to='tshirts.tshirts', verbose_name='T-shirt')),
],
options={
'verbose_name': 'Order line',
'verbose_name_plural': 'Order lines',
},
),
migrations.CreateModel(
name='CartItem',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('quantity', models.PositiveIntegerField(default=1)),
('cart', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tshirts.cart')),
('orderitem_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tshirts.orderitem')),
],
),
migrations.AddField(
model_name='cart',
name='orderitems',
field=models.ManyToManyField(through='tshirts.CartItem', to='tshirts.orderitem'),
),
migrations.CreateModel(
name='Orders',
fields=[
('order_id', models.AutoField(primary_key=True, serialize=False)),
('order_date', models.DateField(auto_now_add=True, verbose_name='Date created')),
('order_total_price', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Total')),
('order_status', models.CharField(choices=[('O', 'Open'), ('P', 'Paid'), ('C', 'Cancelled'), ('S', 'Sent')], default='O', max_length=1, verbose_name='Order status')),
('order_payment_method', models.CharField(choices=[('PP', 'PayPal'), ('PI', 'PayId'), ('VI', 'Visa'), ('MA', 'Master'), ('EX', 'Express'), ('TR', 'Transfer')], max_length=2, verbose_name='Payment method')),
('order_last_modified', models.DateField(auto_now=True, verbose_name='Date last modified')),
('customer_id', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tshirts.customer')),
],
options={
'verbose_name': 'Order',
'verbose_name_plural': 'Orders',
},
),
migrations.AddField(
model_name='orderitem',
name='order_id',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tshirts.orders'),
),
]
This is, in general, a bad idea.
If you have migrations that cannot apply, you’re a lot better off deleting the migration files and rerunning makemigrations. (The admonition against ever deleting a migration file actually only refers to applied migrations. There is no harm to be done by deleting migrations that have not (or cannot) be applied.)
So I would suggest running showmigrations to see what migrations may be pending, delete those migration files, and then rerunning makemigrations.
I deleted all migration files except the initial one. I have recreated the last makemigrations 002 several times but it always fails. But I understand now I don’t need to comment out the reference to auth, 0012
admin
[X] 0001_initial
[X] 0002_logentry_remove_auto_add
[X] 0003_logentry_add_action_flag_choices
auth
[X] 0001_initial
[X] 0002_alter_permission_name_max_length
[X] 0003_alter_user_email_max_length
[X] 0004_alter_user_username_opts
[X] 0005_alter_user_last_login_null
[X] 0006_require_contenttypes_0002
[X] 0007_alter_validators_add_error_messages
[X] 0008_alter_user_username_max_length
[X] 0009_alter_user_last_name_max_length
[X] 0010_alter_group_name_max_length
[X] 0011_update_proxy_permissions
[X] 0012_alter_user_first_name_max_length
cities_light
[X] 0001_initial
[X] 0002_city
[X] 0003_auto_20141120_0342
[X] 0004_autoslug_update
[X] 0005_blank_phone
[X] 0006_compensate_for_0003_bytestring_bug
[X] 0007_make_country_name_not_unique
[X] 0008_city_timezone
[X] 0009_add_subregion
[X] 0010_auto_20200508_1851
[X] 0011_alter_city_country_alter_city_region_and_more
contenttypes
[X] 0001_initial
[X] 0002_remove_content_type_name
faq
[X] 0001_initial
[X] 0002_alter_answer_id_alter_answerhelpful_id_and_more
[X] 0003_auto_20220619_0939
[X] 0004_alter_answer_slug_alter_category_slug
[X] 0005_rename_description_category__description
[X] 0006_answer_is_rich_text
sessions
[X] 0001_initial
tshirts
[X] 0001_initial
[ ] 0002_aussiecities_aussieregions_brand_custompermission_and_more
In the general case, the error you are showing is as a result of a mismatch of data types somewhere in the migration process.
I’ve seen this most frequently when people have edited migration files after they’ve been initially applied to the database, or when the database was altered outside the context of a migration.
Basically what this implies is that your chain of migration files does not properly reflect the current status of the database.
The “easiest” solution to test / validate this is to create a new database, run migrate on that database, then copy the data from the old to the new. If errors occur anytime during that process then those can be tracked down and resolved.
Found the culprit. Indeed a test record in tshirts table. Thank you for your patience and support. ![]()