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

sram_compiler.py - python 3.8.18 posixpath error #207

Closed
htm23x opened this issue Oct 26, 2023 · 4 comments
Closed

sram_compiler.py - python 3.8.18 posixpath error #207

htm23x opened this issue Oct 26, 2023 · 4 comments

Comments

@htm23x
Copy link

htm23x commented Oct 26, 2023

Hi,
I installed openram in Mint 20.3 using pip3 (openram python files wwere deployed to my HOME folder in /home/myusername/.local/lib/python3.8/site-packages/openram ).

Then, I a simple config file... but I'm getting this error related to Pyhton 3.8.18 "posixpath.py":


python3 sram_compiler.py -vv -n /var/tmp/openram_myconfig.py
WARNING: file globals.py: line 168: Failed to find coverage installation. This can be installed with pip3 install coverage
[openram.globals/init_openram]: Initializing OpenRAM...
[openram.globals/setup_paths]: Setting up paths...
[openram.globals/setup_paths]: OpenRAM source code found in /home/myusername/.local/lib/python3.8/site-packages/openram/compiler
[openram.globals/setup_paths]: Temporary files saved in /tmp/openram_yo_68177_temp/
[openram.globals/read_config]: Configuration file is /var/tmp/openram_myconfig.py
[openram.globals/read_config]: Output saved in /home/myusername/.local/lib/python3.8/site-packages/openram/dist/
[openram.globals/install_conda]: Creating conda setup...
[openram.globals/import_tech]: Importing technology: sky130A
[openram.globals/import_tech]: Tech directory found in /home/myusername/.local/lib/python3.8/site-packages/openram/technology:/home/myusername/.local/lib/python3.8/site-packages/openram/technology
[openram.globals/import_tech]: Adding technology path: /home/myusername/.local/lib/python3.8/site-packages/openram/technology
[openram.globals/import_tech]: Adding technology path: /home/myusername/.local/lib/python3.8/site-packages/openram/technology
Traceback (most recent call last):
File "sram_compiler.py", line 42, in
openram.init_openram(config_file=args[0])
File "/home/myusername/.local/lib/python3.8/site-packages/openram/compiler/globals.py", line 190, in init_openram
import_tech()
File "/home/myusername/.local/lib/python3.8/site-packages/openram/compiler/globals.py", line 573, in import_tech
OPTS.openram_tech = os.path.dirname(tech_mod.file) + "/"
File "/home/myusername/.local/lib/python3.8/site-packages/openram/miniconda/lib/python3.8/posixpath.py", line 152, in dirname
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType


(base) myusername@COMPUTER:~/.local/lib/python3.8/site-packages/openram$ python3 --version
Python 3.8.18


(base) myusername@COMPUTER:~/.local/lib/python3.8/site-packages/openram$ lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description: Linux Mint 20.3
Release: 20.3
Codename: una

@htm23x htm23x changed the title sram_compiler.py - python 3.8 posixpath error sram_compiler.py - python 3.8.18 posixpath error Oct 26, 2023
@mguthaus
Copy link
Collaborator

Hi,
Can you try using Python 3.8.10? I don't have an installation of Mint linux and it isn't really supported.

@mguthaus
Copy link
Collaborator

What is in your config file?

@htm23x
Copy link
Author

htm23x commented Oct 26, 2023

Bingo! I was using this param in the config file:

tech_name="sky130A"

which is incorrect ( should be just "sky130", without the final "A" letter ), so python complained.
You should add some validation to the config params to avoid things like that (as the python error message is a bit confusing ).

@htm23x
Copy link
Author

htm23x commented Oct 26, 2023

Closing issue and creating a pull request #210 to improve tech_name param validation before the module is imported. Thanks.

@htm23x htm23x closed this as completed Oct 26, 2023
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

No branches or pull requests

2 participants