title: pydicom : Dataset does not have attribute 'TransferSyntaxUID'
body: <p>Hi I'm suffering from reading DICOM files with pydicom</p>
  
  <p>This post is different from 
  <a href="https://stackoverflow.com/questions/44492420/pydicom-dataset-object-has-no-attribute-transfersyntaxuid">pydicom &#39;Dataset&#39; object has no attribute &#39;TransferSyntaxUID&#39;</a></p>
  
  <p>Here's my code</p>
  
  <pre><code>import dicom
  dicom.read_file(file,force=True)
  </code></pre>
  
  <p>this causes an error</p>
  
  <pre><code>        AttributeError                            Traceback (most recent call last)
      &lt;ipython-input-32-a32aef2d2178&gt; in &lt;module&gt;()
      ----&gt; 1 dicom.read_file(raw_path + pat_lst[0] + '\\' + pat_dcm_lst[0],force=True)
  
      D:\Program Files\Anaconda2\lib\site-packages\dicom\filereader.pyc in read_file(fp, defer_size, stop_before_pixels, force)
          612     try:
          613         dataset = read_partial(fp, stop_when, defer_size=defer_size,
      --&gt; 614                                force=force)
          615     finally:
          616         if not caller_owns_file:
  
      D:\Program Files\Anaconda2\lib\site-packages\dicom\filereader.pyc in read_partial(fileobj, stop_when, defer_size, force)
          520     if preamble:
          521         file_meta_dataset = _read_file_meta_info(fileobj)
      --&gt; 522         transfer_syntax = file_meta_dataset.TransferSyntaxUID
          523         if transfer_syntax == dicom.UID.ImplicitVRLittleEndian:
          524             pass
  
      D:\Program Files\Anaconda2\lib\site-packages\dicom\dataset.pyc in __getattr__(self, name)
          254         if tag not in self:
          255             raise AttributeError("Dataset does not have attribute "
      --&gt; 256                                  "'{0:s}'.".format(name))
          257         else:  # do have that dicom data_element
          258             return self[tag].value
  
      AttributeError: Dataset does not have attribute 'TransferSyntaxUID'.
  </code></pre>
  
  <p>I think something goes wrong when anonymizing. 
  I wanna know why this occurs.</p>
  
  <p>Is deleting TransferSyntaxUID related with DICOM standard?</p>
  
  <p>And, I can read through <code>MATLAB</code>, <code>VTK</code>, <code>ITK</code> but <code>pydicom</code></p>
  
  <p>So now what I'm trying to do is set TransferSyntaxUID manually via <code>SimpleITK</code> and read again via <code>pydicom</code>.</p>
  
  <p>I'll let you know when this works</p>
  
  <p>Thanks in advance</p>