Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [FIAS] Creating street Восточная 5-я ул
- ERROR:root:UNHANDLED EXCEPTION (2014-04-16 13:09:29.225441)
- Working directory: /opt/noc
- <type 'exceptions.UnicodeDecodeError'>
- 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/gis/parsers/address/fias.py (Line: 332)
- Function: sync_buildings
- 325 bld.save()
- 326 # Create address
- 327 street = self.create_street(r.aoguid)
- 328 num, num2, num_letter = split_num2(r.housenum)
- 329 build, build_letter = split_num(r.buildnum)
- 330 estate, estate2, estate_letter = None, None, None
- 331 struct, struct2, struct_letter = None, None, None
- 332 ==> if r.strucnum.startswith("ВЛ."):
- 333 estate = r.strucnum[3:].strip()
- 334 elif r.eststatus in (1, 3):
- 335 estate, estate2, estate_letter = split_num2(r.strucnum)
- 336 else:
- 337 sn = r.strucnum
- 338 if sn.startswith("СТР"):
- Variables:
- estate = None
- split_num = <function split_num at 0x7a5fd70>
- street = <Street: Восточная 5-я, ул>
- oktmo = u'52701000'
- struct2 = None
- num_letter = None
- struct = None
- estate_letter = None
- split_num2 = <function split_num2 at 0x7a5fde8>
- estate2 = None
- struct_letter = None
- bld = <Building: Building object>
- reg = '55'
- build = None
- bd =
- {'_id': ObjectId('534e1e984a5e68423c7198d6'),
- 'aoguid': '7efc5b0b-22d0-483b-a56c-54e33bb54a23',
- 'buildnum': '',
- 'counter': '28',
- 'enddate': '2079-06-06',
- 'eststatus': '2',
- 'houseguid': '4cc2bcd3-f808-44d8-8be3-0000a9ac13f6',
- 'houseid': '4cc2bcd3-f808-44d8-8be3-0000a9ac13f6',
- 'housenum': '53',
- 'ifnsfl': '5503',
- 'ifnsul': '5503',
- 'normdoc': '',
- 'okato': '52401382000',
- 'oktmo': '52701000',
- 'postalcode': '644047',
- 'startdate': '1900-01-01',
- 'statstatus': '0',
- 'strstatus': '0',
- 'strucnum': '',
- 'terrifnsfl': '',
- 'terrifnsul': '',
- 'updatedate': '2012-03-29'}
- num2 = None
- houses =
- Collection(Database(Connection('localhost', 27017), u'noc'), u'noc.cache.fias.houses')
- nq = <function nq at 0x7a5fcf8>
- r =
- 7efc5b0b-22d0-483b-a56c-54e33bb54a23 2079060624cc2bcd3-f808-44d8-8be3-0000a9ac13f64cc2bcd3-f808-44d8-8be3-0000a9ac13f653 055035503524013820005270100064404719000101 0 20120329 28
- b = None
- d = <Division: Омск, г>
- num = u'53'
- t = dbf.Table('local/cache/fias/HOUSE55.DBF', status='closed')
- build_letter = None
- self = <noc.gis.parsers.address.fias.FIASParser object at 0x57f1a90>
- ------------------------------------------------------------------------
- File: /opt/noc/gis/parsers/address/fias.py (Line: 428)
- Function: sync
- 421 def update_levels(self):
- 422 self.info("Updating levels")
- 423 Division.update_levels()
- 424
- 425 def sync(self):
- 426 self.load_addrobj()
- 427 self.load_oktmo()
- 428 ==> self.sync_buildings()
- 429 self.update_levels()
- 430
- 431 ##
- 432 OKTMO = namedtuple("OKTMO", ["okato", "oktmo", "name", "parent"])
- Variables:
- self = <noc.gis.parsers.address.fias.FIASParser object at 0x57f1a90>
- ------------------------------------------------------------------------
- File: /opt/noc/gis/management/commands/update-addr.py (Line: 76)
- Function: handle
- 69 raise CommandError("Failed to download %s" % p.name)
- 70 else:
- 71 print "Skipping downloads"
- 72 # Sync
- 73 try:
- 74 for p in parsers:
- 75 print "Syncing", p.name
- 76 ==> p.sync()
- 77 except:
- 78 error_report()
- Variables:
- a = <module 're' from '/opt/noc/lib/python2.7/re.pyc'>
- self = <noc.gis.management.commands.update-addr.Command object at 0x5590750>
- args = ()
- m =
- <module 'noc.gis.parsers.address.fias' from '/opt/noc/gis/parsers/address/fias.pyc'>
- l = 're'
- p = <noc.gis.parsers.address.fias.FIASParser object at 0x57f1a90>
- parsers = [<noc.gis.parsers.address.fias.FIASParser object at 0x57f1a90>]
- config = <ConfigParser.SafeConfigParser instance at 0x56a6ef0>
- options =
- {'download': False,
- 'pythonpath': None,
- 'reset_cache': False,
- 'settings': None,
- 'traceback': None,
- 'verbosity': '1'}
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement