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

databricksx12.hls package is missing from the pip installation #13

Closed
kenatlogix opened this issue Sep 19, 2024 · 2 comments · Fixed by #14
Closed

databricksx12.hls package is missing from the pip installation #13

kenatlogix opened this issue Sep 19, 2024 · 2 comments · Fixed by #14
Assignees

Comments

@kenatlogix
Copy link

kenatlogix commented Sep 19, 2024

Did the pip installation as guided:
pip install git+https://github.com/databricks-industry-solutions/x12-edi-parser

But then for the import modules as below:
from databricksx12.hls import *
, it errored out:
ModuleNotFoundError: No module named 'databricksx12.hls'

Found that setup.py misses the package. A workaround I made, copied the missing folder, .../databrickx12/hls, from the source code repo and manually located in the installation path.

The setup.py code should be modified as below:

from setuptools import setup, find_packages
from io import open
from os import path
import sys

this_directory = path.abspath(path.dirname(file))
with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
LONG_DESCRIPTION = f.read()

setup(
name="databricksx12",
version="0.0.1",
...
...
],
#packages=['databricksx12'],
packages=find_packages()
#py_modules=['databricksx12']
)

@zavoraad zavoraad self-assigned this Oct 2, 2024
@zavoraad
Copy link
Contributor

zavoraad commented Oct 2, 2024

Hi @kenatlogix , sorry for the late reply didn't have notifications on.

Setup.py is modified on hotfix13 branch to include databricksx12.hls as a package. Can you confirm you can import after installing from this branch?

pip install git+https://github.com/databricks-industry-solutions/x12-edi-parser.git@hotfix13
from databricksx12.hls import *

@zavoraad zavoraad linked a pull request Oct 2, 2024 that will close this issue
@kenatlogix
Copy link
Author

Hi @zavoraad ,
Thanks for the info and the fix. I have verified it. !

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