Changeset 3168 for trunk/CifFile


Ignore:
Timestamp:
Nov 30, 2017 3:00:18 PM (4 years ago)
Author:
vondreele
Message:

fix phase data copy operations - needed copy.deepcopy in 2 places
(partial) fix on cif import - for incommensurate & magnetic structures
fix to StarFile? for latin1 encoding

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CifFile/StarFile.py

    r3137 r3168  
    931931        if len(one_pack)!=1:
    932932            raise ValueError("Bad packet key %s = %s: returned %d packets" % (keyname,keyvalue,len(one_pack)))
    933         print("Keyed packet: %s" % one_pack[0])
     933#        print("Keyed packet: %s" % one_pack[0])
    934934        return one_pack[0]
    935935
     
    21922192        # print("Full URL is: " + my_uri)
    21932193        filestream = urlopen(my_uri)
    2194         text = filestream.read().decode('utf8')
     2194#        text = filestream.read().decode('utf8')
     2195        text = filestream.read().decode('latin1')
    21952196        filestream.close()
    21962197    else:
     
    21982199        text = filestream.read()
    21992200        if not isinstance(text,unicode):
    2200             text = text.decode('utf8')  #CIF is always ascii/utf8
     2201#            text = text.decode('utf8')  #CIF is always ascii/utf8
     2202            text = text.decode('latin1')  #CIF is always ascii/utf8
    22012203        my_uri = ""
    22022204    if not text:      # empty file, return empty block
Note: See TracChangeset for help on using the changeset viewer.