NameError: global name 'VALIDATE_POSTAL_CODES' is not defined
See original GitHub issueIssue Description
running the following command on command line produces the following error:
python manage.py cities --import=postal_code
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/mnt/data/dev/budhub/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/mnt/data/dev/budhub/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/mnt/data/dev/budhub/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 294, in run_from_argv
self.execute(*args, **cmd_options)
File "/mnt/data/dev/budhub/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 345, in execute
output = self.handle(*args, **options)
File "/mnt/data/dev/budhub/venv/local/lib/python2.7/site-packages/django/utils/decorators.py", line 185, in inner
return func(*args, **kwargs)
File "/mnt/data/dev/budhub/venv/local/lib/python2.7/site-packages/cities/management/commands/cities.py", line 146, in handle
func()
File "/mnt/data/dev/budhub/venv/local/lib/python2.7/site-packages/cities/management/commands/cities.py", line 751, in import_postal_code
if VALIDATE_POSTAL_CODES:
NameError: global name 'VALIDATE_POSTAL_CODES' is not defined
Seems to be missing an import on the cities management command in the current master branch.
Issue Analytics
- State:
- Created 6 years ago
- Comments:25 (5 by maintainers)
Top Results From Across the Web
NameError: global name is not defined - python - Stack Overflow
I'm using Python 2.6.1 on Mac OS X. I have two simple Python files (below), but when I run python update_url.py. I get...
Read more >python NameError: global name '__file__' is not defined
PYTHON : python NameError : global name '__file__' is not defined [ Gift : Animated Search Engine : https://www.hows.tech/p/recommended.html ] ...
Read more >NameError: global name is not defined when Python
Continuing on in learning Python as I go I am at the next issue. I have created a Python toolbar add-in with a...
Read more >NameError: global name 'layer' is not defined
Problem has been solved. I've changed the code a little bit. here is the final code. def btn_nuf_pressed(self): layer = geo_utils.
Read more >Global Name Not Defined - General Discussion
NameError : global name 'p' is not defined. SELECT p.lpn AS "LPN", SUBSTRING(p.location, 2, 12) AS "ALOC", p.sku AS "SKU", p.lot_number AS ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closing - pushed to PyPI as version 0.5. Thank you all for your help!
@blag can confirm that import process works right till end ! Congratulations and thanks again !