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

optimizer ko on linux #82

Closed
Sapph0 opened this issue Oct 26, 2021 · 1 comment · Fixed by #83
Closed

optimizer ko on linux #82

Sapph0 opened this issue Oct 26, 2021 · 1 comment · Fixed by #83

Comments

@Sapph0
Copy link

Sapph0 commented Oct 26, 2021

Traceback (most recent call last):
  File "tool.py", line 49, in <module>
    loop.run_until_complete(main())
  File "/usr/lib64/python3.7/asyncio/base_events.py", line 587, in run_until_complete
    return future.result()
  File "tool.py", line 43, in main
    await handle_query(raw_query)
  File "tool.py", line 30, in handle_query
    result = await ada.do(raw_query)
  File "/bot/ada/ada/ada.py", line 26, in do
    return await self.__opt.optimize(query)
  File "/bot/ada/ada/optimizer.py", line 366, in optimize
    os.makedirs(os.path.dirname(filename), exist_ok=True)
  File "/usr/lib64/python3.7/os.py", line 223, in makedirs
    mkdir(name, mode)
FileNotFoundError: [Errno 2] No such file or directory: ''

on an aws ec2 Amazon Linux.

can be corrected on this platform by replacing in the file
ada/optimizer.py

# Write out complete problem to file
        filename = 'output\problem.txt'
        os.makedirs(os.path.dirname(filename), exist_ok=True)

the \ by a /

@dopeghoti
Copy link
Contributor

Technically rather than hardcoding either a \ or a / it should be using os.path.sep to just use the correct slash for the environment.

dopeghoti added a commit to dopeghoti/ada that referenced this issue Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants