Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when working with datafile from MoManI #124

Open
HauHe opened this issue Aug 8, 2022 · 1 comment
Open

Problem when working with datafile from MoManI #124

HauHe opened this issue Aug 8, 2022 · 1 comment

Comments

@HauHe
Copy link
Contributor

HauHe commented Aug 8, 2022

Hi I ran a model that I originally extracted from MoManI using cplex. Now I would like to convert the results sol to csv files. But I get the error below:

otoole --verbose results cplex csv DE_25sens.sol result_csvs --input_datafile DE_25sens_data.txt
Traceback (most recent call last):
  File "C:\Users\adm.esa\Anaconda3\envs\otoole\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\adm.esa\Anaconda3\envs\otoole\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\adm.esa\Anaconda3\envs\otoole\Scripts\otoole.exe\__main__.py", line 7, in <module>
  File "C:\Users\adm.esa\Anaconda3\envs\otoole\lib\site-packages\otoole\cli.py", line 299, in main
    args.func(args)
  File "C:\Users\adm.esa\Anaconda3\envs\otoole\lib\site-packages\otoole\cli.py", line 113, in result_matrix
    input_data, _ = ReadDatafile().read(args.input_datafile)
  File "C:\Users\adm.esa\Anaconda3\envs\otoole\lib\site-packages\otoole\read_strategies.py", line 215, in read
    amply_datafile = self.read_in_datafile(filepath, config)
  File "C:\Users\adm.esa\Anaconda3\envs\otoole\lib\site-packages\otoole\read_strategies.py", line 232, in read_in_datafile
    datafile_parser.load_file(datafile)
  File "C:\Users\adm.esa\Anaconda3\envs\otoole\lib\site-packages\amply\amply.py", line 817, in load_file
    self.load_string(f.read())
  File "C:\Users\adm.esa\Anaconda3\envs\otoole\lib\site-packages\amply\amply.py", line 806, in load_string
    obj.eval(self)
  File "C:\Users\adm.esa\Anaconda3\envs\otoole\lib\site-packages\amply\amply.py", line 311, in eval
    obj.addData(self.records.asList(), default=self.default)
  File "C:\Users\adm.esa\Anaconda3\envs\otoole\lib\site-packages\amply\amply.py", line 440, in addData
    " subscripts per value" % len(self.free_indices)
amply.amply.AmplyError: Incomplete data record, expecting 2 subscripts per value

I also tried to convert the datafile used to a datapackage, but I get the same error. Is the conversion of MoManI datafile not possible with otoole? Or is there an other issue?

@HauHe HauHe changed the title Problem when with datafile from MoManI Problem when working with datafile from MoManI Aug 8, 2022
@HauHe
Copy link
Contributor Author

HauHe commented Oct 4, 2022

@willu47 , do you know what might be the problem here? If you point me in a direction, perhaps I could fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant