BSS run error on data type

Viewing 5 reply threads
  • Author
    Posts
    • #127
      jiafucang
      Participant

      Hi,

      I am using BSS to do statistical analysis, but encountered a problem,
      The program runs on Windows 10 workstation, with Miniconda, R-3.2.2(x64) installed in the default location.
      When python bss_run.py modelspec_skeleton_cbm_left.ini ../output_cbm_left in D:\software\BrainSuite\USC2015\ICBM25, it outputs the following error info.

      Unexpected error: <type ‘exceptions.TypeError’>
      Traceback (most recent call last):
      File “bss_run.py”, line 82, in bss_run
      statsdata = StatsData(model.demographics, model)
      File “C:\Miniconda\lib\site-packages\bss\stats_data.py”, line 93, in __init__
      self.atlas_data = NimgDataio.read(model.atlas, attributes_only=False)
      File “C:\Miniconda\lib\site-packages\bss\nimgdata_io.py”, line 74, in read
      return NimgDataio.read_surface(filename)
      File “C:\Miniconda\lib\site-packages\bss\nimgdata_io.py”, line 88, in read_surface
      return dfsio.readdfs(filename)
      File “C:\Miniconda\lib\site-packages\bss\dfsio.py”, line 59, in readdfs
      NFV.faces = np.array(struct.unpack((‘i’ * 3 * hdr.nTriangles), fid.read(3 * hdr.nTriangles * 4)),
      TypeError: ufunc ‘multiply’ did not contain a loop with signature matching types dtype(‘S11’) dtype(‘S11’) dtype(‘S11’)
      None
      Elapsed time 0.0469999313354 sec.

      The modelspec_skeleton_cbm_left.ini is as follows:
      [subjectinfo]
      subjectid=subjID
      demographics=ICBM_demographics.csv
      fileid=File_cbm_left
      atlas=C:\Program Files\BrainSuite15b\svreg\BrainSuiteAtlas1\mri.left.mid.cortex.dfs
      maskfile=

      [analysis]
      type=cbm

      [model]
      modeltype=glm
      fullmodel=Age+Sex
      nullmodel=Sex
      test=anova

      Thank you very much!

      Best,
      Fcuang

    • #141
      David Shattuck
      Keymaster

      Hi Fcuang –

      We have a currently testing a fix for this. We will update you on this once it is ready for download.

      thanks,
      David Shattuck

    • #144
      David Shattuck
      Keymaster

      Hi Fcuang –

      The BSS software has been updated with a fix for this issue. Can you try reinstalling and let us know if it worked?

      thanks,
      David Shattuck

    • #145
      jiafucang
      Participant

      Hi David,

      Thank you very much, I updated to new version, and the problem is fixed. But I encounter some problem related to Miniconda packages, working on that. If the work is done, I will let you know.

      Best,
      Fucang

    • #148
      jiafucang
      Participant

      Hi David,

      The BSS works. Due to a patsy 0.4.0 version will give numeric error:
      Running the statistical model. This may take a while…
      Something went wrong. Please send this error message to the developers.
      Unexpected error: <type ‘exceptions.ValueError’>
      Traceback (most recent call last):
      File “bss_run.py”, line 89, in bss_run
      statsresult = statsengine.run()
      File “C:\Miniconda\lib\site-packages\bss\stats_engine.py”, line 88, in run
      statsresult = self.commands[self.model.analysis_type + ‘_’ + self.model.stat_test](self.model, self.stats_data)
      File “C:\Miniconda\lib\site-packages\bss\cbm_stats.py”, line 242, in anova_np
      X_design_full = dmatrix(model.fullmodel, data=sdata.demographic_data) # Design matrix for full model
      File “C:\Miniconda\lib\site-packages\patsy\highlevel.py”, line 278, in dmatrix
      NA_action, return_type)
      File “C:\Miniconda\lib\site-packages\patsy\highlevel.py”, line 152, in _do_highlevel_design
      NA_action)
      File “C:\Miniconda\lib\site-packages\patsy\highlevel.py”, line 57, in _try_incr_builders
      NA_action)
      File “C:\Miniconda\lib\site-packages\patsy\build.py”, line 706, in design_matrix_builders
      categories=None)
      File “C:\Miniconda\lib\site-packages\patsy\design_info.py”, line 88, in __init__
      raise ValueError(“For numerical factors, num_columns ”
      ValueError: For numerical factors, num_columns must be an int
      None
      Elapsed time 0.526000022888 sec.

      I updated the patsy to version 0.4.1

      Now it works great.

      Thank you very much!

      Best,
      Fucang

      • #210
        Anand Joshi
        Moderator

        Hi, It seems that the problems are fixed, but for the future, I recommend running
        >conda update –all
        after updating individual packages. This command will make sure that no dependencies are broken by the update.

    • #150
      David Shattuck
      Keymaster

      Fucang –

      Great! Glad to hear it’s working.

      cheers,
      David

Viewing 5 reply threads
  • You must be logged in to reply to this topic.