Save CSV files by AnyPyTools

Hi, I want to save some results to csv files.
So I am studying Anypytools tutorial.
but It doesn't work and I don't know why it gives the error.
Here are my code and error message.

Completed: 0, Not processed: 1
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
C:\Anaconda3\envs\py37\lib\site-packages\anypytools\abcutils.py in start_macro(self, macrolist, folderlist, search_subdirs, logfile)
    773         try:
--> 774             with tqdm(total=len(tasklist), disable=self.silent) as pbar:
    775                 for task in self._schedule_processes(tasklist):

C:\Anaconda3\envs\py37\lib\site-packages\tqdm\notebook.py in __init__(self, *args, **kwargs)
    238         total = self.total * unit_scale if self.total else self.total
--> 239         self.container = self.status_printer(self.fp, total, self.desc, self.ncols)
    240         self.container.pbar = self

C:\Anaconda3\envs\py37\lib\site-packages\tqdm\notebook.py in status_printer(_, total, desc, ncols)
    112             raise ImportError(
--> 113                 "IProgress not found. Please update jupyter and ipywidgets."
    114                 " See https://ipywidgets.readthedocs.io/en/stable"

ImportError: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html

During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last)
<ipython-input-10-00ae1bb65ffb> in <module>
----> 1 app.start_macro(macrolist);

C:\Anaconda3\envs\py37\lib\site-packages\anypytools\abcutils.py in start_macro(self, macrolist, folderlist, search_subdirs, logfile)
    785         finally:
    786             if not self.silent:
--> 787                 tqdm.write(tasklist_summery(tasklist))
    788 
    789         self.cleanup_logfiles(tasklist)

C:\Anaconda3\envs\py37\lib\site-packages\tqdm\std.py in write(cls, s, file, end, nolock)
    621             # Write the message
    622             fp.write(s)
--> 623             fp.write(end)
    624 
    625     @classmethod

C:\Anaconda3\envs\py37\lib\contextlib.py in __exit__(self, type, value, traceback)
    117         if type is None:
    118             try:
--> 119                 next(self.gen)
    120             except StopIteration:
    121                 return False

C:\Anaconda3\envs\py37\lib\site-packages\tqdm\std.py in external_write_mode(cls, file, nolock)
    648             # Force refresh display of bars we cleared
    649             for inst in inst_cleared:
--> 650                 inst.refresh(nolock=True)
    651         finally:
    652             if not nolock:

C:\Anaconda3\envs\py37\lib\site-packages\tqdm\std.py in refresh(self, nolock, lock_args)
   1349             else:
   1350                 self._lock.acquire()
-> 1351         self.display()
   1352         if not nolock:
   1353             self._lock.release()

C:\Anaconda3\envs\py37\lib\site-packages\tqdm\notebook.py in display(self, msg, pos, close, bar_style, check_delay)
    161             msg = self.format_meter(**d)
    162 
--> 163         ltext, pbar, rtext = self.container.children
    164         pbar.value = self.n
    165 

AttributeError: 'tqdm' object has no attribute 'container'



Can data save as csv or pandas dataframe?
Or I want to save some simulation results as one h5 file.

and How do I separate columns when one variable contains three values, such as marker acceleration values?

Thank you for your help.

Hi @twosejin

From the error log it seems that you need to update your Jupyter and ipywidgets package. There is probably a mismatch in the anypytools and jupyter package version you are running.

Best regards,
Bjørn

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.