Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

No Windows console found. Are you running cmd.exe? #1211

Closed
swanknight opened this issue Dec 1, 2021 · 9 comments
Closed

No Windows console found. Are you running cmd.exe? #1211

swanknight opened this issue Dec 1, 2021 · 9 comments
Labels
help Extra attention is needed

Comments

@swanknight
Copy link

I'm trying to create a GUI for lncrawl (using .NET 5) but I cam across an odd issue, when I try to run lncrawl from my UI I keep getting an error: "No Windows console found. Are you running cmd.exe?"

These are the parameters I used for my test:

lncrawl -s https://novelfull.com/i-alone-level-up.html -o "D:\" --all -f --format epub --single

@dipu-bd
Copy link
Owner

dipu-bd commented Dec 1, 2021

Try like this:

using System.Diagnostics;

Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "/C lncrawl -s https://novelfull.com/i-alone-level-up.html -o "D:\" --all -f --format epub --single";
process.StartInfo = startInfo;
process.Start();

@swanknight
Copy link
Author

Try like this:

using System.Diagnostics;

Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "/C lncrawl -s https://novelfull.com/i-alone-level-up.html -o "D:\" --all -f --format epub --single";
process.StartInfo = startInfo;
process.Start();

It doesn't work. I need to redirect the output to my UI (RichTextox) and it doesn't work if I try to use "cmd".
I've made plenty of GUI applications before but I never needed to run "cmd", so something is odd with lncrawl.

@dipu-bd
Copy link
Owner

dipu-bd commented Dec 2, 2021

Add --suppress argument. it will stop prompting any command line inputs. e.g.: lncrawl -s https://novelfull.com/i-alone-level-up.html -o "D:\" --all -f --format epub --single --suppress

@swanknight
Copy link
Author

swanknight commented Dec 2, 2021

--suppress

That did fix the error but for some reason, it's not creating the epub file. I can see that it created the json folder and downloaded the content but nothing happens in the end. This is the output I get in my "console":

================================================================================
                         [#] Lightnovel Crawler v2.28.11 
                  https://github.com/dipu-bd/lightnovel-crawler 
--------------------------------------------------------------------------------
 ! Input is suppressed
--------------------------------------------------------------------------------
Namespace(add_source_url=False, all=True, bot=None, chapters=None, crawler=[], extra={}, filename=None, filename_only=False, first=None, force=True, ignore=False, last=None, list_sources=False, log=None, login=None, multi=False, novel_page='https://novelfull.com/i-alone-level-up.html', output_formats=['epub'], output_path='D:\\', page=None, query=None, range=None, shard_count=1, shard_id=0, single=True, suppress=True, volumes=None)

-> Press  Ctrl + C  to exit

Retrieving novel info...
https://novelfull.com/i-alone-level-up.html
NOVEL: I Alone Level-Up
3 volumes and 270 chapters found

@dipu-bd
Copy link
Owner

dipu-bd commented Dec 2, 2021

it is showing output_formats=['epub'] as argument. that means the problem is somewhere else. try running it again with -lll option. it will print more details log

@swanknight
Copy link
Author

Adding -lll doesn't seem to display anything new, and it doesn't download anything after adding it.
Also, it's strange that even though that without -lll it does download the chapters and creates the json folder, I see no progress in the log.

================================================================================
                         [#] Lightnovel Crawler v2.28.11 
                  https://github.com/dipu-bd/lightnovel-crawler 
--------------------------------------------------------------------------------
                          << LOG LEVEL: DEBUG
--------------------------------------------------------------------------------
 ! Input is suppressed
--------------------------------------------------------------------------------
Namespace(add_source_url=False, all=True, bot=None, chapters=None, crawler=[], extra={}, filename=None, filename_only=False, first=None, force=True, ignore=False, last=None, list_sources=False, log=3, login=None, multi=False, novel_page='https://novelfull.com/i-alone-level-up.html', output_formats=['epub'], output_path='D:\\', page=None, query=None, range=None, shard_count=1, shard_id=0, single=True, suppress=True, volumes=None)

-> Press  Ctrl + C  to exit

Retrieving novel info...
https://novelfull.com/i-alone-level-up.html
NOVEL: I Alone Level-Up
3 volumes and 270 chapters found

@dipu-bd
Copy link
Owner

dipu-bd commented Dec 2, 2021

Without any error log, I don't know how to solve the issue.

There was an old issue for command line encoding. #927 #882 #892

Check if this is the cause.

@swanknight
Copy link
Author

swanknight commented Dec 2, 2021

Without any error log, I don't know how to solve the issue.

There was an old issue for command line encoding. #927 #882 #892

Check if this is the cause.

Unfortunately the -lll doesn't display anything and as I said, it even refuses to even download when used.
The strange thing is when I ran lncrawl separately through cmd using the exact same parameters it's working fine.

Update: funny thing, when I used i instead of f it worked...sometimes. Yep, using the exact same parameters it worked sometimes and failed sometimes. This is too bizzare.

@dipu-bd
Copy link
Owner

dipu-bd commented Feb 6, 2022

Any update on this? Can you check the latest version?

@dipu-bd dipu-bd added the help Extra attention is needed label Feb 6, 2022
Repository owner locked and limited conversation to collaborators Feb 6, 2022
@dipu-bd dipu-bd converted this issue into discussion #1270 Feb 6, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
help Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants