-
Notifications
You must be signed in to change notification settings - Fork 18
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
Running on Windows Results in error #146
Comments
Tried to run the ocr/tesseract.mrsh file and got the error above |
So this is one of the more complicated examples, as you need to install and have available on your The exact phrasing there is a bit misleading, now that I think about it, because in the third stage of the compiler it runs the code against the test suite it generated. So that comment is technically correct (the best kind!) but implies when you manually run the code, not when you indirectly run the code during the compile process itself. Can you try again with those libraries installed? I don't personally know how to install them on Windows, though. Perhaps @aguillenv does, though he's asleep right now, so we'd have to wait until he wakes up if you can't figure that part out. |
The poppler and tesseract packages are probably needed running the generated code not during marsha execution. From the logs shared this seems an issue with marsha handling the file system I'll dig and see if I find what could be the issue since I'm not working on Windows. |
@JohnPeng47 let us know if the issue is solved for you! If you pip-installed Marsha, make sure to run it again with the |
Uhh now Im getting two errors instead of one:
Second run:
|
Also.. not saying this to be an asshole, because personally I think the idea behind this project is really cool, and much needed to push the edge of LLM codegen. But your code is insanely hard to read. Would suggest doing a refactor to improve readability, modularity, all that good stuff, before pushing out any features. OSS contributions is hard, but doing it on a codebase like this makes the task Herculean |
This is a quote from your first run, same error as before. I'm spinning up a Windows VM to see if I can reproduce on my end, since the earlier change didn't fix things for you (though it did fix it for Github's Windows runner) As for your second comment, it's pretty vague. What exactly is hard to read for you? The logic for parsing the |
I cannot reproduce your error @JohnPeng47 Steps I took on a fresh Win10 VM:
|
C:\Users\jpeng\Documents\business\ai\marsha\marsha>python -m marsha tesseract.mrsh
Compiling functions for tesseract...
Generating Python code...
Chat query took 15sec 553.156ms, started at 44.45ms, ms/chars = 12.363398965856797
Chat query took 24sec 196.805ms, started at 26.371ms, ms/chars = 12.661855049871887
Writing generated code to temporary files...
FILENAME: tesseract_0/tesseract.py
FILENAME: tesseract_0/requirements.txt
FILENAME: tesseract_0/tesseract_test.py
Writing generated code to temporary files...
FILENAME: tesseract_1/tesseract.py
FILENAME: tesseract_1/requirements.txt
FILENAME: tesseract_1/tesseract_test.py
Writing generated code to temporary files...
FILENAME: tesseract_2/tesseract.py
FILENAME: tesseract_2/requirements.txt
FILENAME: tesseract_2/tesseract_test.py
Running tasks in parallel...
Parsing generated code...
Parsing generated code...
Verifying and correcting generated code...
Creating virtual environment...
Parsing generated code...
Verifying and correcting generated code...
Creating virtual environment...
Chat query took 10sec 55.1715ms, started at 24sec 377.311ms, ms/chars = 13.371238683132415
Installing requirements...
TESTFILE: tesseract_1\tesseract_test.py
Failed to run test suite... [WinError 2] The system cannot find the file specified
Third stage failure
argument of type 'NoneType' is not iterable
Task completed with error. Waiting for pending tasks to finish...
Running tasks in parallel...
Installing requirements...
TESTFILE: tesseract_2\tesseract_test.py
Failed to run test suite... [WinError 2] The system cannot find the file specified
Third stage failure
argument of type 'NoneType' is not iterable
Task completed with error. Waiting for pending tasks to finish...
Running tasks in parallel...
Chat query took 14sec 694.8ms, started at 34sec 434.483ms, ms/chars = 19.884708931062153
FILENAME: tesseract_0\tesseract_test.py
Chat query took 28sec 31.8413ms, started at 49sec 133.387ms, ms/chars = 38.03506279250498
FILENAME: tesseract_0\tesseract_test.py
Chat query took 40sec 667.973ms, started at 1min 17sec, ms/chars = 54.882554711922296
FILENAME: tesseract_0\tesseract_test.py
Second stage failure
('Failed to generate code', "tesseract_0\tesseract_test.py:35:5 [E] E0602 undefined name 'unittest' [pyflakes]")
All tasks failed. Raising exception...
Failed to generate working code.
('Failed to generate code', "tesseract_0\tesseract_test.py:35:5 [E] E0602 undefined name 'unittest' [pyflakes]")
Retrying...
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\jpeng\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\marsha_main.py", line 6, in
asyncio.run(main())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 649, in run_until_complete
return future.result()
File "C:\Users\jpeng\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\marsha\base.py", line 217, in main
raise Exception(
Exception: Failed to generate working code for tesseract. Total time elapsed: 1min 59sec. Total cost: 0.02.
The text was updated successfully, but these errors were encountered: