Hi, sorry if this is noobish or was already reported (didn't found a similar issue), but I tried to follow the procedure described in the markdown to have a running local PokeAPI, and it failed complained that the main.pokemon_v2_region__old table didn't exist. I'm using a fresh working copy downloaded from master branch just today.
C:\Victor\Projetos\pokeapi>pip install -r requirements.txt
Collecting Django==2.1.2 (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/32/ab/22530cc1b2114e6067eece94a333d6c749fa1c56a009f0721e51c181ea53/Django-2.1.2-py3-none-any.whl (7.3MB)
100% |████████████████████████████████| 7.3MB 364kB/s
Collecting Pillow==2.6.1 (from -r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/9f/53/9dafa3a48ffa25f4e22f40df880b58b99ad53648f0990caf09b1824d5db2/Pillow-2.6.1.tar.gz (7.3MB)
100% |████████████████████████████████| 7.3MB 385kB/s
Collecting Unipath==1.1 (from -r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/8c/56/de14fb87407047321dad378cb403c6a9adfb7ba394a6f0e9d8839b8b0ef3/Unipath-1.1.tar.gz
Collecting coverage==4.5.1 (from -r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/f7/c4/6efad398453dd8bcef7c49a56ea43c9d102e6bad82ad5f4dcb931f4809bd/coverage-4.5.1-cp37-cp37m-win32.whl (180kB)
100% |████████████████████████████████| 184kB 546kB/s
Collecting django-appconf==1.0.2 (from -r requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/5b/78/726cdf3e04660560cf25f9def95b8f2736310c581dabed9adfe60154a9f8/django_appconf-1.0.2-py2.py3-none-any.whl
Collecting django-cors-headers==2.4.0 (from -r requirements.txt (line 6))
Downloading https://files.pythonhosted.org/packages/cc/7e/83ba784ad2b95317bbbed915f0888d7d1cd8dc3d2e4b8ddec8fbc4c3e800/django_cors_headers-2.4.0-py2.py3-none-any.whl
Collecting django-discover-runner==1.0 (from -r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/73/2e/24b60ba1cb4898aa63c06fa40ddb444907f6f071795c217bfba499a350c7/django_discover_runner-1.0-py2.py3-none-any.whl
Collecting django-imagekit==4.0.2 (from -r requirements.txt (line 8))
Downloading https://files.pythonhosted.org/packages/e5/2a/a5c62376e897c23d1ce21be86c18e68096cb8c83df7d010d24ca81139e9e/django_imagekit-4.0.2-py2.py3-none-any.whl (47kB)
100% |████████████████████████████████| 51kB 655kB/s
Collecting django-redis==4.10.0 (from -r requirements.txt (line 9))
Downloading https://files.pythonhosted.org/packages/f8/79/1fd48c585d5a95fd314571ac34c13f6bc1f7e65cbb5ed9ac0299212f35ce/django_redis-4.10.0-py2.py3-none-any.whl
Collecting django-cachalot==2.1.0 (from -r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/4f/10/9c089de2cd152b9848cb6d5af9da3be130ba86e3d4b3b9784990e388eacd/django_cachalot-2.1.0-py3-none-any.whl (44kB)
100% |████████████████████████████████| 51kB 819kB/s
Collecting django-tastypie==0.14.2 (from -r requirements.txt (line 11))
Downloading https://files.pythonhosted.org/packages/92/46/3a166f9d4fab4baf0d919755cc7223d02a48b0d4e159c89050aa1f61cd1f/django-tastypie-0.14.2.tar.gz (146kB)
100% |████████████████████████████████| 153kB 546kB/s
Collecting djangorestframework==3.9.0 (from -r requirements.txt (line 12))
Downloading https://files.pythonhosted.org/packages/99/0b/d37a5a96c5d301e23adcabcc2f3fa659fb34e6308590f95ebb50cdbe98a1/djangorestframework-3.9.0-py2.py3-none-any.whl (924kB)
100% |████████████████████████████████| 931kB 504kB/s
Collecting drf-ujson==1.2.0 (from -r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/21/50/a6977457a2c2dd1423b29ca9766b569b9977cb0f082853d96dd51f6cb3ed/drf_ujson-1.2.tar.gz
Collecting gunicorn==19.9.0 (from -r requirements.txt (line 14))
Downloading https://files.pythonhosted.org/packages/8c/da/b8dd8deb741bff556db53902d4706774c8e1e67265f69528c14c003644e6/gunicorn-19.9.0-py2.py3-none-any.whl (112kB)
100% |████████████████████████████████| 122kB 504kB/s
Collecting mimeparse==0.1.3 (from -r requirements.txt (line 15))
Downloading https://files.pythonhosted.org/packages/38/0c/7b02c30765658744acc51876781c580234cb1110296b231a3a524722f9c7/mimeparse-0.1.3.tar.gz
Collecting pilkit==2.0 (from -r requirements.txt (line 16))
Downloading https://files.pythonhosted.org/packages/c4/5c/318d9c20f309e6a79ea4d4605f86597d05f3e007d3d1925ff02474808659/pilkit-2.0.tar.gz (161kB)
100% |████████████████████████████████| 163kB 468kB/s
Collecting psycopg2==2.7.5 (from -r requirements.txt (line 17))
Downloading https://files.pythonhosted.org/packages/12/89/9bbcc4ab312be0e32abd268512fce75f13a015c4c6a6340b600d168f0dbd/psycopg2-2.7.5-cp37-cp37m-win32.whl (852kB)
100% |████████████████████████████████| 860kB 546kB/s
Collecting python-dateutil==2.7.3 (from -r requirements.txt (line 18))
Downloading https://files.pythonhosted.org/packages/cf/f5/af2b09c957ace60dcfac112b669c45c8c97e32f94aa8b56da4c6d1682825/python_dateutil-2.7.3-py2.py3-none-any.whl (211kB)
100% |████████████████████████████████| 215kB 504kB/s
Collecting python-mimeparse==1.6.0 (from -r requirements.txt (line 19))
Downloading https://files.pythonhosted.org/packages/26/2e/03bce213a9bf02a2750dcb04e761785e9c763fc11071edc4b447eacbb842/python_mimeparse-1.6.0-py2.py3-none-any.whl
Collecting simplejson==3.16.0 (from -r requirements.txt (line 20))
Downloading https://files.pythonhosted.org/packages/e3/24/c35fb1c1c315fc0fffe61ea00d3f88e85469004713dab488dee4f35b0aff/simplejson-3.16.0.tar.gz (81kB)
100% |████████████████████████████████| 81kB 524kB/s
Collecting six==1.11.0 (from -r requirements.txt (line 21))
Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting pytz (from Django==2.1.2->-r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/87/76/46d697698a143e05f77bec5a526bf4e56a0be61d63425b68f4ba553b51f2/pytz-2019.2-py2.py3-none-any.whl (508kB)
100% |████████████████████████████████| 512kB 546kB/s
Collecting redis>=2.10.0 (from django-redis==4.10.0->-r requirements.txt (line 9))
Downloading https://files.pythonhosted.org/packages/bd/64/b1e90af9bf0c7f6ef55e46b81ab527b33b785824d65300bb65636534b530/redis-3.3.8-py2.py3-none-any.whl (66kB)
100% |████████████████████████████████| 71kB 458kB/s
Collecting ujson (from drf-ujson==1.2.0->-r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/16/c4/79f3409bc710559015464e5f49b9879430d8f87498ecdc335899732e5377/ujson-1.35.tar.gz (192kB)
100% |████████████████████████████████| 194kB 468kB/s
Installing collected packages: pytz, Django, Pillow, Unipath, coverage, django-appconf, django-cors-headers, django-discover-runner, six, pilkit, django-imagekit, redis, django-redis, django-cachalot, python-mimeparse, python-dateutil, django-tastypie, djangorestframework, ujson, drf-ujson, gunicorn, mimeparse, psycopg2, simplejson
Running setup.py install for Pillow ... done
Running setup.py install for Unipath ... done
Found existing installation: six 1.12.0
Uninstalling six-1.12.0:
Successfully uninstalled six-1.12.0
Running setup.py install for pilkit ... done
Running setup.py install for django-tastypie ... done
Running setup.py install for ujson ... done
Running setup.py install for drf-ujson ... done
Running setup.py install for mimeparse ... done
Running setup.py install for simplejson ... done
Successfully installed Django-2.1.2 Pillow-2.6.1 Unipath-1.1 coverage-4.5.1 django-appconf-1.0.2 django-cachalot-2.1.0 django-cors-headers-2.4.0 django-discover-runner-1.0 django-imagekit-4.0.2 django-redis-4.10.0 django-tastypie-0.14.2 djangorestframework-3.9.0 drf-ujson-1.2 gunicorn-19.9.0 mimeparse-0.1.3 pilkit-2.0 psycopg2-2.7.5 python-dateutil-2.7.3 python-mimeparse-1.6.0 pytz-2019.2 redis-3.3.8 simplejson-3.16.0 six-1.11.0 ujson-1.35
You are using pip version 19.0.3, however version 19.2.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Victor\Projetos\pokeapi>python manage.py migrate --settings=config.local
Operations to perform:
Apply all migrations: admin, auth, contenttypes, pokemon_v2, sessions, sites, tastypie
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying admin.0003_logentry_add_action_flag_choices... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying pokemon_v2.0001_squashed_0002_auto_20160301_1408... OK
Applying pokemon_v2.0002_itemsprites_pokemonformsprites_pokemonsprites... OK
Applying pokemon_v2.0003_auto_20160530_1132... OK
Applying sessions.0001_initial... OK
Applying sites.0001_initial... OK
Applying sites.0002_alter_domain_unique... OK
Applying tastypie.0001_initial... OK
Applying tastypie.0002_api_access_url_length... OK
C:\Victor\Projetos\pokeapi>python manage.py runserver --settings=config.local
Performing system checks...
System check identified no issues (0 silenced).
September 01, 2019 - 14:46:40
Django version 2.1.2, using settings 'config.local'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[01/Sep/2019 14:46:57] code 400, message Bad request version ("\x8e8(Àu\x92\x11¦-á$>(\x89-\x0eÓ®VJ'[/\x94þ\x97jJ¥\x00$\x13\x01\x13\x03\x13\x02À+À/̨̩À,À0À")
[01/Sep/2019 14:46:57] You're accessing the development server over HTTPS, but it only supports HTTP.
[01/Sep/2019 14:46:57] code 400, message Bad request syntax ("\x16\x03\x01\x02\x00\x01\x00\x01ü\x03\x03ózùB'ÞEÅEîä;!Fpf¹Íj")
[01/Sep/2019 14:46:57] You're accessing the development server over HTTPS, but it only supports HTTP.
[01/Sep/2019 14:47:07] code 400, message Bad request version ('\x17\x7fz[G\x00$\x13\x01\x13\x03\x13\x02À+À/̨̩À,À0À')
[01/Sep/2019 14:47:07] You're accessing the development server over HTTPS, but it only supports HTTP.
Not Found: /api/v2/pokemon/402/
[01/Sep/2019 14:47:35] "GET /api/v2/pokemon/402/ HTTP/1.1" 404 23
C:\Victor\Projetos\pokeapi>python manage.py shell --settings=config.local
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from data.v2.build import build_all
>>> build_all()
building pokemon_v2_language
building pokemon_v2_languagename
building pokemon_v2_region
building pokemon_v2_regionname
building pokemon_v2_generation
Traceback (most recent call last):
File "C:\Python\Python37-32\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "C:\Python\Python37-32\lib\site-packages\django\db\backends\sqlite3\base.py", line 296, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: main.pokemon_v2_region__old
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "C:\Victor\Projetos\pokeapi\data\v2\build.py", line 1697, in build_all
_build_generations()
File "C:\Victor\Projetos\pokeapi\data\v2\build.py", line 179, in _build_generations
build_generic((Generation,), "generations.csv", csv_record_to_objects)
File "C:\Victor\Projetos\pokeapi\data\v2\build.py", line 102, in build_generic
model_class.objects.bulk_create(batch)
File "C:\Python\Python37-32\lib\site-packages\django\db\models\manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "C:\Python\Python37-32\lib\site-packages\django\db\models\query.py", line 459, in bulk_create
self._batched_insert(objs_with_pk, fields, batch_size)
File "C:\Python\Python37-32\lib\site-packages\django\db\models\query.py", line 1155, in _batched_insert
self._insert(item, fields=fields, using=self.db)
File "C:\Python\Python37-32\lib\site-packages\django\db\models\query.py", line 1136, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "C:\Python\Python37-32\lib\site-packages\cachalot\monkey_patch.py", line 32, in inner
return original(compiler, *args, **kwargs)
File "C:\Python\Python37-32\lib\site-packages\cachalot\monkey_patch.py", line 100, in inner
return original(write_compiler, *args, **kwargs)
File "C:\Python\Python37-32\lib\site-packages\django\db\models\sql\compiler.py", line 1289, in execute_sql
cursor.execute(sql, params)
File "C:\Python\Python37-32\lib\site-packages\django\db\backends\utils.py", line 100, in execute
return super().execute(sql, params)
File "C:\Python\Python37-32\lib\site-packages\cachalot\monkey_patch.py", line 124, in inner
return original(cursor, sql, *args, **kwargs)
File "C:\Python\Python37-32\lib\site-packages\django\db\backends\utils.py", line 68, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "C:\Python\Python37-32\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
return executor(sql, params, many, context)
File "C:\Python\Python37-32\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "C:\Python\Python37-32\lib\site-packages\django\db\utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "C:\Python\Python37-32\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "C:\Python\Python37-32\lib\site-packages\django\db\backends\sqlite3\base.py", line 296, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: main.pokemon_v2_region__old
Note: ignore the part of the Bad requests. I've tried to open it in the browser using HTTPS instead of HTTP before calling build_all().
Hi, sorry if this is noobish or was already reported (didn't found a similar issue), but I tried to follow the procedure described in the markdown to have a running local PokeAPI, and it failed complained that the
main.pokemon_v2_region__oldtable didn't exist. I'm using a fresh working copy downloaded from master branch just today.Here is my full console log:
Note: ignore the part of the Bad requests. I've tried to open it in the browser using HTTPS instead of HTTP before calling
build_all().