You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
when trying to set settings in jupyter notebook:
settings = Settings(fn_yaff='pars_cov.txt', plot_traj='All', xyz_traj=True)
The following error occurred:
/Users/ignaspakamore/Anaconda/anaconda2/lib/python2.7/site-packages/quickff/settings.py in init(self, fn, **kwargs)
166 #first read general RC settings from .quickffrc file
167 with path('quickff.data', 'quickffrc') as fn_default:
--> 168 self.read_config_file(fn_default)
169 #if a config file is provided, read settings from this file and
170 #overwrite the default RC settings
/Users/ignaspakamore/Anaconda/anaconda2/lib/python2.7/site-packages/quickff/settings.py in read_config_file(self, fn)
190
191 def read_config_file(self, fn):
--> 192 with open(fn, 'r') as f:
193 for iline, line in enumerate(f.readlines()):
194 line = line.split('#')[0].lstrip().rstrip().rstrip('\n')
TypeError: coercing to Unicode: need string or buffer, PosixPath found
The text was updated successfully, but these errors were encountered:
first of all, thank you for reporting this and sorry for the late reply. This might have to do with compatibility between python 3 and python 2. If this still is an issue, maybe the following small hack in the source code of QuickFF could work.
In the line 168 of settings.py mentioned in the second paragraph of your traceback, change the line
self.read_config_file(fn_default)
to the line
self.read_config_file(str(fn_default))
Hi,
when trying to set settings in jupyter notebook:
settings = Settings(fn_yaff='pars_cov.txt', plot_traj='All', xyz_traj=True)
The following error occurred:
TypeError Traceback (most recent call last)
in ()
----> 1 settings = Settings(fn_yaff='pars_cov.txt', plot_traj='All', xyz_traj=True)
/Users/ignaspakamore/Anaconda/anaconda2/lib/python2.7/site-packages/quickff/settings.py in init(self, fn, **kwargs)
166 #first read general RC settings from .quickffrc file
167 with path('quickff.data', 'quickffrc') as fn_default:
--> 168 self.read_config_file(fn_default)
169 #if a config file is provided, read settings from this file and
170 #overwrite the default RC settings
/Users/ignaspakamore/Anaconda/anaconda2/lib/python2.7/site-packages/quickff/settings.py in read_config_file(self, fn)
190
191 def read_config_file(self, fn):
--> 192 with open(fn, 'r') as f:
193 for iline, line in enumerate(f.readlines()):
194 line = line.split('#')[0].lstrip().rstrip().rstrip('\n')
TypeError: coercing to Unicode: need string or buffer, PosixPath found
The text was updated successfully, but these errors were encountered: