PermissionError: [Errno 13] Permission denied: 'C:\\Users\\BenWo\\OneDrive\\Documents\\Python Scripts\\AnswersDocLookup\\LDAModel'I tried running as an administrator and get the same result. Do you know what is causing this?
Here is the extra error info:
--------------------------------------------------------------------------- PermissionError Traceback (most recent call last) <ipython-input-3-50be626ed50b> in <module> ----> 1 lda_reload = gensim.models.LdaModel.load(os.getcwd()) 2 NewDir = os.getcwd() 3 lda_reload.save(NewDir) ~\anaconda3\lib\site-packages\gensim\models\ldamodel.py in load(cls, fname, *args, **kwargs) 1636 """ 1637 kwargs['mmap'] = kwargs.get('mmap', None) -> 1638 result = super(LdaModel, cls).load(fname, *args, **kwargs) 1639 1640 # check if `random_state` attribute has been set after main pickle load ~\anaconda3\lib\site-packages\gensim\utils.py in load(cls, fname, mmap) 424 compress, subname = SaveLoad._adapt_by_suffix(fname) 425 --> 426 obj = unpickle(fname) 427 obj._load_specials(fname, mmap, compress, subname) 428 logger.info("loaded %s", fname) ~\anaconda3\lib\site-packages\gensim\utils.py in unpickle(fname) 1379 1380 """ -> 1381 with open(fname, 'rb') as f: 1382 # Because of loading from S3 load can't be used (missing readline in smart_open) 1383 if sys.version_info > (3, 0): ~\anaconda3\lib\site-packages\smart_open\smart_open_lib.py in open(uri, mode, buffering, encoding, errors, newline, closefd, opener, ignore_ext, transport_params) 187 buffering=buffering, 188 encoding=encoding, --> 189 errors=errors, 190 ) 191 if fobj is not None: ~\anaconda3\lib\site-packages\smart_open\smart_open_lib.py in _shortcut_open(uri, mode, ignore_ext, buffering, encoding, errors) 360 open_kwargs['errors'] = errors 361 --> 362 return _builtin_open(local_path, mode, buffering=buffering, **open_kwargs) 363 364 PermissionError: [Errno 13] Permission denied: 'C:\\Users\\BenWo\\OneDrive\\Documents\\Python Scripts\\AnswersDocLookup\\LDAModel'
--
You received this message because you are subscribed to the Google Groups "Gensim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gensim+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gensim/d45a1a01-0516-416b-b2a5-cd6ad099f0fb%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to gen...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gensim/d45a1a01-0516-416b-b2a5-cd6ad099f0fb%40googlegroups.com.
TypeError Traceback (most recent call last) ~\anaconda3\lib\site-packages\gensim\utils.py in save(self, fname_or_handle, separately, sep_limit, ignore, pickle_protocol) 691 try: --> 692 _pickle.dump(self, fname_or_handle, protocol=pickle_protocol) 693 logger.info("saved %s object", self.__class__.__name__) TypeError: file must have a 'write' attribute During handling of the above exception, another exception occurred:
PermissionError Traceback (most recent call last)
<ipython-input-5-b130cc769f15> in <module> 1 lda_reload = gensim.models.LdaModel.load(temp_file) 2 # NewDir = os.getcwd() ----> 3 lda_reload.save(LDADir) ~\anaconda3\lib\site-packages\gensim\models\ldamodel.py in save(self, fname, ignore, separately, *args, **kwargs) 1603 else: 1604 separately = separately_explicit -> 1605 super(LdaModel, self).save(fname, ignore=ignore, separately=separately, *args, **kwargs) 1606 1607 @classmethod ~\anaconda3\lib\site-packages\gensim\utils.py in save(self, fname_or_handle, separately, sep_limit, ignore, pickle_protocol) 693 logger.info("saved %s object", self.__class__.__name__) 694 except TypeError: # `fname_or_handle` does not have write attribute --> 695 self._smart_save(fname_or_handle, separately, sep_limit, ignore, pickle_protocol=pickle_protocol) 696 697 ~\anaconda3\lib\site-packages\gensim\utils.py in _smart_save(self, fname, separately, sep_limit, ignore, pickle_protocol) 547 compress, subname) 548 try: --> 549 pickle(self, fname, protocol=pickle_protocol) 550 finally: 551 # restore attribs handled specially ~\anaconda3\lib\site-packages\gensim\utils.py in pickle(obj, fname, protocol) 1361 1362 """ -> 1363 with open(fname, 'wb') as fout: # 'b' for binary, needed on Windows 1364 _pickle.dump(obj, fout, protocol=protocol) 1365
~\anaconda3\lib\site-packages\smart_open\smart_open_lib.py in open(uri, mode, buffering, encoding, errors, newline, closefd, opener, ignore_ext, transport_params) 187 buffering=buffering, 188 encoding=encoding, --> 189 errors=errors, 190 ) 191 if fobj is not None: ~\anaconda3\lib\site-packages\smart_open\smart_open_lib.py in _shortcut_open(uri, mode, ignore_ext, buffering, encoding, errors) 360 open_kwargs['errors'] = errors 361 --> 362 return _builtin_open(local_path, mode, buffering=buffering, **open_kwargs) 363 364
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\BenWo\\Documents\\Python Files\\AnswersDocLookup\\LDAModel'To unsubscribe from this group and stop receiving emails from it, send an email to gensim+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gensim/8789ad4d-65f2-448a-b8a7-ef968a3b66f3%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to gensim+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gensim/8789ad4d-65f2-448a-b8a7-ef968a3b66f3%40googlegroups.com.
-rr
To unsubscribe from this group and stop receiving emails from it, send an email to gensim+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gensim/8789ad4d-65f2-448a-b8a7-ef968a3b66f3%40googlegroups.com.
--_____________________________________________________________________Ben Reaves--
--
You received this message because you are subscribed to the Google Groups "Gensim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gensim+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gensim/c83fff5f-a260-4419-bb25-8b22eade21ff%40googlegroups.com.
![]() |
| |||||
| FlexSim Software Products, Inc. | 1577 N Technology Way | Building A, Suite 2300 | Orem, UT 84097 | fax: 801‑224‑6984 | |