Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.29 KB | None | 0 0
  1. [FIAS] Creating street Восточная 5-я ул
  2. ERROR:root:UNHANDLED EXCEPTION (2014-04-16 13:09:29.225441)
  3. Working directory: /opt/noc
  4. <type 'exceptions.UnicodeDecodeError'>
  5. 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
  6. START OF TRACEBACK
  7. ------------------------------------------------------------------------
  8. File: /opt/noc/gis/parsers/address/fias.py (Line: 332)
  9. Function: sync_buildings
  10.  325                             bld.save()
  11.  326                             # Create address
  12.  327                             street = self.create_street(r.aoguid)
  13.  328                             num, num2, num_letter = split_num2(r.housenum)
  14.  329                             build, build_letter = split_num(r.buildnum)
  15.  330                             estate, estate2, estate_letter = None, None, None
  16.  331                             struct, struct2, struct_letter = None, None, None
  17.  332 ==>                         if r.strucnum.startswith("ВЛ."):
  18.  333                                 estate = r.strucnum[3:].strip()
  19.  334                             elif r.eststatus in (1, 3):
  20.  335                                 estate, estate2, estate_letter = split_num2(r.strucnum)
  21.  336                             else:
  22.  337                                 sn = r.strucnum
  23.  338                                 if sn.startswith("СТР"):
  24. Variables:
  25.              estate = None
  26.           split_num = <function split_num at 0x7a5fd70>
  27.              street = <Street: Восточная 5-я, ул>
  28.               oktmo = u'52701000'
  29.             struct2 = None
  30.          num_letter = None
  31.              struct = None
  32.       estate_letter = None
  33.          split_num2 = <function split_num2 at 0x7a5fde8>
  34.             estate2 = None
  35.       struct_letter = None
  36.                 bld = <Building: Building object>
  37.                 reg = '55'
  38.               build = None
  39.                  bd =
  40. {'_id': ObjectId('534e1e984a5e68423c7198d6'),
  41. 'aoguid': '7efc5b0b-22d0-483b-a56c-54e33bb54a23',
  42. 'buildnum': '',
  43. 'counter': '28',
  44. 'enddate': '2079-06-06',
  45. 'eststatus': '2',
  46. 'houseguid': '4cc2bcd3-f808-44d8-8be3-0000a9ac13f6',
  47. 'houseid': '4cc2bcd3-f808-44d8-8be3-0000a9ac13f6',
  48. 'housenum': '53',
  49. 'ifnsfl': '5503',
  50. 'ifnsul': '5503',
  51. 'normdoc': '',
  52. 'okato': '52401382000',
  53. 'oktmo': '52701000',
  54. 'postalcode': '644047',
  55. 'startdate': '1900-01-01',
  56. 'statstatus': '0',
  57. 'strstatus': '0',
  58. 'strucnum': '',
  59. 'terrifnsfl': '',
  60. 'terrifnsul': '',
  61. 'updatedate': '2012-03-29'}
  62.                num2 = None
  63.              houses =
  64. Collection(Database(Connection('localhost', 27017), u'noc'), u'noc.cache.fias.houses')
  65.                  nq = <function nq at 0x7a5fcf8>
  66.                   r =
  67. 7efc5b0b-22d0-483b-a56c-54e33bb54a23          2079060624cc2bcd3-f808-44d8-8be3-0000a9ac13f64cc2bcd3-f808-44d8-8be3-0000a9ac13f653            055035503524013820005270100064404719000101          0        20120329                                      28
  68.                   b = None
  69.                   d = <Division: Омск, г>
  70.                 num = u'53'
  71.                   t = dbf.Table('local/cache/fias/HOUSE55.DBF', status='closed')
  72.        build_letter = None
  73.                self = <noc.gis.parsers.address.fias.FIASParser object at 0x57f1a90>
  74. ------------------------------------------------------------------------
  75. File: /opt/noc/gis/parsers/address/fias.py (Line: 428)
  76. Function: sync
  77.  421         def update_levels(self):
  78.  422             self.info("Updating levels")
  79.  423             Division.update_levels()
  80.  424
  81.  425         def sync(self):
  82.  426             self.load_addrobj()
  83.  427             self.load_oktmo()
  84.  428 ==>         self.sync_buildings()
  85.  429             self.update_levels()
  86.  430
  87.  431     ##
  88.  432     OKTMO = namedtuple("OKTMO", ["okato", "oktmo", "name", "parent"])
  89. Variables:
  90.                self = <noc.gis.parsers.address.fias.FIASParser object at 0x57f1a90>
  91. ------------------------------------------------------------------------
  92. File: /opt/noc/gis/management/commands/update-addr.py (Line: 76)
  93. Function: handle
  94.   69                         raise CommandError("Failed to download %s" % p.name)
  95.   70             else:
  96.   71                 print "Skipping downloads"
  97.   72             # Sync
  98.   73             try:
  99.   74                 for p in parsers:
  100.   75                     print "Syncing", p.name
  101.   76 ==>                 p.sync()
  102.   77             except:
  103.   78                 error_report()
  104. Variables:
  105.                   a = <module 're' from '/opt/noc/lib/python2.7/re.pyc'>
  106.                self = <noc.gis.management.commands.update-addr.Command object at 0x5590750>
  107.                args = ()
  108.                   m =
  109. <module 'noc.gis.parsers.address.fias' from '/opt/noc/gis/parsers/address/fias.pyc'>
  110.                   l = 're'
  111.                   p = <noc.gis.parsers.address.fias.FIASParser object at 0x57f1a90>
  112.             parsers = [<noc.gis.parsers.address.fias.FIASParser object at 0x57f1a90>]
  113.              config = <ConfigParser.SafeConfigParser instance at 0x56a6ef0>
  114.             options =
  115. {'download': False,
  116. 'pythonpath': None,
  117. 'reset_cache': False,
  118. 'settings': None,
  119. 'traceback': None,
  120. 'verbosity': '1'}
  121. ------------------------------------------------------------------------
  122. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement