Anaconda-Navigator problem loading packages - anaconda

I am currently on Windows 11 and facing this problem since upgrade. Each time I install anaconda-navigator, on first time opening it runs smoothly however on second time if I open from windows, it opens but gets stuck on environment loading and when I open it from prompt, I get the error below. I do realize that error is from conda-script.py line587 however I don't want to do modifications blindly so need some expert opinion on how to resolve it.
I never faced these issues even on last moment on Windows 10, and I don't know how much windows upgrade is a problem here.
(base) C:\Users\abdul>anaconda-navigator
2021-10-20 19:51:06,740 - ERROR anaconda_api._pip_data_ready:579
C:/Users/abdul/anaconda3/python.exe C:/Users/abdul/anaconda3/Scripts/conda-script.py list --json: Not a conda environment: C:/ProgramData/Anaconda3
Traceback (most recent call last):
File "C:\Users\abdul\anaconda3\lib\site-packages\anaconda_navigator\api\anaconda_api.py", line 587, in _pip_data_ready
channel_urls = set(package['base_url'] for package in output if package['platform'] != 'pypi')
File "C:\Users\abdul\anaconda3\lib\site-packages\anaconda_navigator\api\anaconda_api.py", line 587, in <genexpr>
channel_urls = set(package['base_url'] for package in output if package['platform'] != 'pypi')
TypeError: string indices must be integers

Related

OSError: [WinError 87] The parameter is incorrect: Jupyter & Anaconda

I am using Jupyter notebooks via anaconda. When saving a new notebook to a specific directory, the whole directory becomes inaccessible, showing this error (image and text below). Other directories and the notebooks inside them are still accessible and able to be run. I am able to save new notebooks and run them in other directories no problem.
Error:
Server error: Traceback (most recent call last): File "C:\Users\u1252652.conda\envs\DS011_loss_ratio\lib\site-packages\tornado\web.py", line 1704, in _execute result = await result File "C:\Users\u1252652.conda\envs\DS011_loss_ratio\lib\site-packages\tornado\gen.py", line 234, in wrapper yielded = ctx_run(next, result) File "C:\Users\u1252652.conda\envs\DS011_loss_ratio\lib\site-packages\notebook\services\contents\handlers.py", line 116, in get model = yield maybe_future(self.contents_manager.get( File "C:\Users\u1252652.conda\envs\DS011_loss_ratio\lib\site-packages\notebook\services\contents\filemanager.py", line 435, in get model = self._dir_model(path, content=content) File "C:\Users\u1252652.conda\envs\DS011_loss_ratio\lib\site-packages\notebook\services\contents\filemanager.py", line 309, in _dir_model for name in os.listdir(os_dir): OSError: [WinError 87] The parameter is incorrect: 'C:\Users\u1252652\OneDrive - MMC\Documents\DS011_loss_ratio'
This is strange as i have been working in this directory and saving numerous notebooks to it without error until today. I can delete the notebook that caused it to crash and then it returns to normal and i can run notebooks that were already saved before today.
I am unsure if this is related or not but i also have an issue whereby i have to run python -m ipykernel install --user every time i change to a new environment in anaconda, otherwise the executable remains as that of the last environment i ran that command with. Perhaps this is useful i'm not sure, if anyone had advice with this too i'd be grateful.
I have also tried making a new directory, copying over the contents of the dysfunctional directory, and then making a new notebook from there, however this causes the same error.

rethinkdb CURLOPT_ACCEPT_ENCODING was not declared in this scope error

I am working on installing rethinkdb on my server, which is a CentOS 6.9 machine. I followed all the directions for a CentOS server as described here for CentOS 6. I got all the way to the command scl enable devtoolset-2 -- make but while building, on line 244 of 421, the line that reads build/release/obj/extproc/http_job.o I receive the error "CURLOPT_ACCEPT_ENCODING was not declared in this scope"
I don't know what this means or why the error is popping up, but I can't continue with the build process as long as that error is there.
I found an obscure article that mentions a fix for this particular error. If you go into the rethinkdb folder on the server, you can then navigate to src/extproc/http_job.cc and open that file in a text editor. You can then search for the function void set_default_opts and inside of that function is the line exc_setopt(curl_handle, CURLOPT_ACCEPT_ENCODING, "", "PROTOCOLS); If you just change CURLOPT_ACCEPT_ENCODING to `CURLOPT_ENCODING, you will be able to continue the build process. It worked for me.

Python web scraping stopped working - Invalid File Error

I have been working on a web scraping program and it has recently just stopped working and is giving me the following error.
Traceback (most recent call last):
File "C:/Users/Bob/Desktop/test 3.5.py", line 7, in <module>
with open(saveDB,'rb') as f:
TypeError: invalid file: WindowsPath('Z:/project1/MasterWellDB.txt')
Where Z: is a network drive, but I have also moved the file locally and the error still exists.
I have tried multiple python versions, uninstalled and reinstalled visual studio multiple times and I am still clueless.
Here is my code:
from pathlib import Path
import pickle
# Opening well database
saveDB = Path(r"Z:\project1\MasterWellDB.txt")
#open picked DB if avaiable else remake database
if saveDB.exists():
with open(saveDB,'rb') as f:
wells = pickle.load(f)
print('success!')
Any help would be greatly appreciated. Thanks!

vim clang_complete VIo4231.tmp missing

I installed the clang_complete plugin for vim and whenever the code completion has to come, it gives me this error(when setting g:clang_complete_copen = 1, so i can see the error)
Error detected while processing function ClangComplete..32_ClangCompleteBinary:
line 15
E484: Can't open file C:\Users\GEBRUI~1\AppData\Local\Temp\VIo811.tmp
and when i start looking for that file isn't there.

MySQL 5.5. installation on Windows doesn't show up in the registry properly

I am trying to get Django with MySQL working on my Windows 7 machine.
I need mySQLDB interface for this. When I try to install "mySQLDB interface", it looks for the MySQL installation in HKEY_LOCAL_MACHINE.
But in my registry it shows up in HKEY_CURRENT_USER/SOFTWARE/MySQL AB/MySQL Server 5.5.
My SQL instance seems to work fine.
MySQLDB installer somehow needs this in HKEY_LOCAL_MACHINE (I think) as it doesn't let me finish the install. It throws me this error.
Traceback (most recent call last):
File "setup.py", line 15, in <module>
metadata, options = get_config()
File "C:\Blah\Software\MySQL-python-1.2.3\setup_windows.
py", line 8, in get_config
mysql_root, dummy = _winreg.QueryValueEx(serverKey,'Location')
WindowsError: [Error 2] The system cannot find the file specified
Thanks a lot for your time.
You can fix the registry key in site.cfg. Or you can download a Windows MSI package from SourceForge. (No, it did not exist when the question was posted.)

Resources