Caster
Caster copied to clipboard
Pip Install Bug
I tried installing caster through PIP. I got the following error.
Generic Exception: Traceback (most recent call last):
File "c:\users\egoldste\appdata\local\temp\pip-install-rf5jki\castervoice\post_setup.py", line 39, in setup
shutil.copy("_caster.py", directory)
File "c:\python27\lib\shutil.py", line 119, in copy
copyfile(src, dst)
File "c:\python27\lib\shutil.py", line 69, in copyfile
raise Error("%s
and %s
are the same file" % (src, dst))
Error: _caster.py
and .\_caster.py
are the same file
Caster: Report Error to https://github.com/dictation-toolbox/caster/issues
Close window to continue
c:\users\egoldste\appdata\local\temp\pip-install-rf5jki\castervoice>
When I rerun the PIP command, PIP thinks that caster has been installed correctly and does not attempt to fix this problem. I had to delete caster from python manually to reproduce this error.
Thanks for reporting this issue! The PIP install this very alpha and won't go live until the ccr rewrite and a couple of other features.
So the PIP uninstall did not properly remove the package?
Self Note error handling
try:
shutil.copy(src, dst)
except shutil.SameFileError:
Sorry, I wasn't clear. While the PIP uninstall did not work properly, I was able to remove the package by simply deleting the castervoice folder from the Python2 directory.
@ethangoldstein
Could you try executing the following in your Python environment? The following code should print the absolute path to your natlink user directory.
import natlinkstatus
status = natlinkstatus.NatlinkStatus()
directory = status.getUserDirectory()
print directory
The current code checks to see if the path is valid however the source and destination path could be the same and valid. It looks to me that status.getUserDirectory
failed producing an empty path. Thus explaining .\_caster.py
.
The results are:
UserDirectory: . . [Finished in 1.3s]
@ethangoldstein That would be the issue status.getUserDirectory()
is returning a blank path.
What version of Natlink do you have installed?
What is your current Natlink UserDirectory absolute path via Configure Natlink via GUI
?
@ethangoldstein Update to natlink-4.2
rerun to test
import natlinkstatus
status = natlinkstatus.NatlinkStatus()
directory = status.getUserDirectory()
print directory
This error also occurs if you try to use python setup.py install
. So some further error handling is needed.
However however the post install script is trying to address where to place _caster.py
so that natlink or other engine loaders can load Caster.