Errors saving Engine in v4.0.1 -- pyrep?

70 views
Skip to first unread message

Peter Metz

unread,
Jan 22, 2020, 1:28:40 PM1/22/20
to fullrmc
Hi Bachir,

I recently upgraded to fullrmc v4.0.1 (clean conda env with python 3.7.5). I'm raising a couple errors trying to use scripts I had written using the previous release.

It seems perhaps this has something to do with pyrep?


Problem 1:

I'm getting an error when initializing an Engine with freshStart = True (directory exists) or when trying to load a saved Engine.

Traceback (most recent call last):

  File "C:\Users\pce\Dropbox (ORNL)\Projects\2019_Misture_Leon_Hollandite\hollandite\fullrmc\run.py", line 55, in <module>
    ENGINE = Engine(path=engineSavePath, freshStart=True)  # new Engine instance

  File "C:\Anaconda3\envs\fullrmc\lib\site-packages\fullrmc\Engine.py", line 163, in __init__
    assert result, LOGGER.error(message)

AssertionError: None


Problem 2:

An AssertionError is raised when trying to save an Engine instance with an added constraint instance

Traceback (most recent call last):

  File "C:\Users\pce\Dropbox (ORNL)\Projects\2019_Misture_Leon_Hollandite\hollandite\fullrmc\run.py", line 83, in <module>
    ENGINE.save()

  File "C:\Anaconda3\envs\fullrmc\lib\site-packages\fullrmc\Engine.py", line 879, in save
    self._dump_to_repository(value=value, relativePath=os.path.join(self.__usedFrame, 'constraints', c.constraintName, dname), repository=REP)

  File "C:\Anaconda3\envs\fullrmc\lib\site-packages\fullrmc\Engine.py", line 353, in _dump_to_repository
    repository.dump(value=value, relativePath=relativePath, replace=True)

  File "C:\Anaconda3\envs\fullrmc\lib\site-packages\pyrep\Repository.py", line 2412, in dump
    return self.dump_file(*args, **kwargs)

  File "C:\Anaconda3\envs\fullrmc\lib\site-packages\pyrep\Repository.py", line 426, in wrapper
    return func(self, *args, **kwargs)

  File "C:\Anaconda3\envs\fullrmc\lib\site-packages\pyrep\Repository.py", line 2407, in dump_file
    assert not raiseError or error is None, "unable to dump file '%s' after %i trials (%s)"%(relativePath, ntrials, error,)

AssertionError: unable to dump file '0\constraints\PairDistributionConstraint_0\_PairDistributionConstraint__minimumDistance' after 3 trials (unable to dump the file ([Errno 2] No such file or directory: '{absolute path here}\\0\\constraints\\PairDistributionConstraint_0\\._PairDistributionConstraint__minimumDistance_pyrepfileinfo'))

Bachir Aoun

unread,
Jan 22, 2020, 5:01:57 PM1/22/20
to fullrmc
Hi Peter,

can you please pull the last pyrep version from here 
and replace the old version with this one? do the same for pylocker 

I published fullrmc 4.1 after some accumulated requests for python 3 and later i discovered some compatibility issues.

let me know if updating your packages will solve the issue. if not I probably need to publish a new version but i am very busy with my work day job now.

thank you 

Peter Metz

unread,
Jan 28, 2020, 10:47:03 AM1/28/20
to fullrmc
Hi Bachir,

Sorry for the delayed response.

I installed pyrep 3.2.0 and pylocker 3.0.0 from the master branch on github. I'm still raising the same errors as described above. A bit more info below.

Thanks for your support.

________________________________________________________________________________________

I'm not very fluent with setup tools, but I had to edit your setup script for pyrep...

Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "...\pip-req-build-plu901hx\setup.py", line 82, in <module>
        from pyrep import __version__
    ModuleNotFoundError: No module named 'pyrep'

hence

#pcm get package version
#pcm from pyrep import __version__
 
# get package info
PACKAGE_INFO={}
if sys.version_info.major == 2:
    execfile(convert_path( '__pkginfo__.py' ), PACKAGE_INFO)
else:
    exec(open(convert_path( '__pkginfo__.py' )).read(), PACKAGE_INFO)
__version__ = PACKAGE_INFO['__version__']


I now have the following regarding fullrmc dependencies.


fullrmc                                  (4.0.1)
matplotlib>=2.2.3                        (3.1.2)
pylocker>=2.0.0                          (3.0.0)
pyrep>=3.1.0                             (3.2.0)
pysimplelog>=2.0.0                       (2.0.0)
pdbparser>=0.1.7                         (0.1.7)
numpy>=1.11                              (1.17.4)
cycler>=0.10                             (0.10.0)
kiwisolver>=1.0.1                        (1.1.0)
pyparsg!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1   (2.4.5)
python-dateutil>=2.1                     (2.8.1)
six                                      (1.13.0)
setuptools                               (42.0.2.post20191203)


 

Bachir Aoun

unread,
Jan 28, 2020, 11:09:40 AM1/28/20
to fullrmc
Hi Peter,

actually pyrep doesn't need to be installed.
locate the library and copy the new version files.

this is how you can easily locate the library. 
import pyrep
print(pyrep)

let me know 

Bachir Aoun

unread,
Jan 28, 2020, 11:11:23 AM1/28/20
to fullrmc
After you fix this pyrep issue.
since you trying to recreate the engine. can you manually delete old engine directory and try to create again.

maybe it's time that i package a new version of fullrmc ... 

thanks

Bachir Aoun

unread,
Jan 29, 2020, 11:37:34 AM1/29/20
to ful...@googlegroups.com
Peter,

I pushed a new version of fullrmc. please update your installation and let me know if that solves your problems.

best


Peter Metz

unread,
Jan 29, 2020, 1:01:43 PM1/29/20
to fullrmc
Hi Bachir,

Version 4.1.0 appears to have resolved these issues.

Thank you for your continuing support!

-Peter
Reply all
Reply to author
Forward
0 new messages