visidata icon indicating copy to clipboard operation
visidata copied to clipboard

[Windows] Error msg: "the procedure entry point ... could not be located"

Open gilbh opened this issue 3 years ago • 4 comments

On running a .csv file, the program puts out this message: image

No "Recent Error" on Ctrl-E. wa_trans_book.vd.log

Visidata version: 2.8

gilbh avatar Feb 23 '22 12:02 gilbh

Hi @gilbh!

Unfortunately, these are really challenging to debug, and on first glance it actually seems to be a Python problem, not a VisiData problem.

I can try to see if more information helps us figure it out, but it may be that a web search is more helpful.

  • How did you install Python?
  • Is this the first time you intentionally tried to run a Python program on your machine?
  • How did you install VisiData?
  • Which version of Windows? Did you recently upgrade Windows?
  • Is this a fresh install of VisiData, or has VisiData previously worked on your machine? Has Python previously worked on your machine?

anjakefala avatar Feb 23 '22 18:02 anjakefala

Thanks!!

Indeed, I also have a sense this is something with my Python installation, although the issue never came up until I ran VisiData. My installation of Python is layered and complicated (as it happens so many times ...). I had Conda, but then switched to pip installation (3.9). This is also how I installed VisiData. I run Windows 10 64bit (clean installation, no major upgrades).

I do a lot of work with Python although usually but running ipython. I noticed VisiData runs as an .exe. deployment, which I usually don't do (could this be related?).

I did the same installation of VisiData on my laptop (also Windows 10) and did not encounter this issue...

Can you explain the "area" in which this bug occur (so maybe I could connect it to a bigger problem I have with Python)? What is this .dll in charge of?

Thanks again, Gil

gilbh avatar Feb 23 '22 23:02 gilbh

My installation of Python is layered and complicated

:joy: :sob:

Can you explain the "area" in which this bug occur (so maybe I could connect it to a bigger problem I have with Python)? What is this .dll in charge of?

It may take me a few days to respond, because I need to dedicate focus time to look into this! I am not very comfortable with the Windows installation (e.g., I do not know what the .dll is in charge of...) I want to become more comfortable, and so I want to try to help with understanding your problem.

What might be helpful, before I find the time, is that I can talk about the buzzword "entry point".

A setup.py can install "entry points", which are commandline commands for launching the program (for VisiData, the entrypoints are vd and visidata https://github.com/saulpw/visidata/blob/stable/setup.py#L19).

Do both vd blah.csv and visidata blah.csv result in the same problem? My understanding is that vd blah.csv has not been working for Windows users, but visidata blah.csv has been. Depending on which you are using, it might not be able to find the code related to the entry point. (The error message feels almost like it knows this is an entry point, but cannot find the actual code related to the entry point?)

anjakefala avatar Feb 24 '22 18:02 anjakefala

Thanks.

This happens with visidata blah.csv. Let me know what more info I might provide.

gilbh avatar Mar 02 '22 02:03 gilbh

@gilbh It did take me a while! Do you still want help with this? Have you figured out how to launch VisiData?

anjakefala avatar Jan 07 '23 04:01 anjakefala

Thanks @anjakefala

some water under the bridge already ... right now, under Python 3.10, I getting the following exception when trying to run VisiData 2.11:

Traceback (most recent call last):
  File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "c:\users\gilbe\Envs\utils\Scripts\vd.exe\__main__.py", line 4, in <module>
  File "C:\Users\gilbe\Envs\utils\lib\site-packages\visidata\__init__.py", line 33, in <module>
    from .vdobj import *
  File "C:\Users\gilbe\Envs\utils\lib\site-packages\visidata\vdobj.py", line 3, in <module>
    import curses
  File "C:\Python310\lib\curses\__init__.py", line 13, in <module>
    from _curses import *

Now, I am not if this is a specific problem or something bigger, as as curses is notoriously unstable in Windows ...

Let me know if there's a way out of this ...

Thanks!

gilbh avatar Jan 17 '23 00:01 gilbh

Ah yes, this is a known Windows issue!

https://github.com/saulpw/visidata/pull/1407

@ajkerrigan has merged a fix that will hopefully ensure that it will not pop up in the future. =( But for reference, please install windows-curses from PyPI.

anjakefala avatar Mar 03 '23 05:03 anjakefala

Thanks!!

gilbh avatar Mar 03 '23 16:03 gilbh