Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Spyder Python editor error with Anaconda #679

Open
KaixuanDai opened this issue May 29, 2020 · 5 comments
Open

[Bug] Spyder Python editor error with Anaconda #679

KaixuanDai opened this issue May 29, 2020 · 5 comments
Labels
bug Something isn't working Windows Microsoft Windows specific

Comments

@KaixuanDai
Copy link

KaixuanDai commented May 29, 2020

When I run gs.run_command( ) in spyder, which shows the error infomation as follow:
It happened in window10.

Traceback (most recent call last):

  File "<ipython-input-3-61a6952a394a>", line 1, in <module>
    runfile('C:/Users/ddd/.spyder-py3/temp.py', wdir='C:/Users/ddd/.spyder-py3')

  File "D:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 668, in runfile
    execfile(filename, namespace)

  File "D:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "C:/Users/ddd/.spyder-py3/temp.py", line 70, in <module>
    for rast in gscript.list_strings(type='raster'):

  File "C:\Program Files\GRASS GIS 7.8\etc\python\grass\script\core.py", line 1288, in list_strings
    mapset=mapset).splitlines():

  File "C:\Program Files\GRASS GIS 7.8\etc\python\grass\script\core.py", line 503, in read_command
    return handle_errors(returncode, stdout, args, kwargs)

  File "C:\Program Files\GRASS GIS 7.8\etc\python\grass\script\core.py", line 343, in handle_errors
    returncode=returncode)

CalledModuleError: Module run None g.list --q -m type=raster ended with error
Process ended with non-zero return code 3221225785. See errors in the (error) output.
@KaixuanDai KaixuanDai added the bug Something isn't working label May 29, 2020
@neteler
Copy link
Member

neteler commented May 29, 2020

Do you use GRASS GIS 7.8.3?

@KaixuanDai
Copy link
Author

Yes, I use the GRASS GIS 7.8.3 (64bit), which download from Download GRASS GIS for MS-Windows
.
When I run the spyder in the terminal of GRASS GIS session, there were no errors to run these scripts and everything is correct. However, if I want to run the GRASS package from outside of the session, which shows the errors.
When I try to do the same thing in Ubuntu environment, which can work well. So I gusse maybe the error caused by Windows system?

Do you use GRASS GIS 7.8.3?

@KaixuanDai
Copy link
Author

With the error infomation, another error infomation is:
The procedure entry point sqlite3_column_origin_name could not be located in the dynamic link library C:\Program Files\GDAL\gdal300.dll
I use the method from Error on libcurl.dll when using GDAL of OSGeo4W in Django to solve this problem.
In my computer, the reason is the program uses error .dll file from Anaconda enviornment Library.

@neteler
Copy link
Member

neteler commented Jun 6, 2020

To me it sounds like DLL confusion, i.e. there are different versions of gdal300.dll in place.
Anaconda is a must for you?

@neteler neteler added the Windows Microsoft Windows specific label Jun 6, 2020
@neteler neteler changed the title [Bug] Python editor error [Bug] Spyder Python editor error with Anaconda Jun 6, 2020
@KaixuanDai
Copy link
Author

It's exactly true that problem causes by the DLL confusion, and the method above is a temporary solution. Because even if I open the Spyder corrctly, I meet other errors for packages in Anaconda enviornment. At present I uninstall Anaconda and use Spyder independently, so there is no error any more. But I am curious to know how to make it find the right DLLs when Anaconda is installed. Thanks for your answers !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Windows Microsoft Windows specific
Projects
None yet
Development

No branches or pull requests

2 participants