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

Semlog has no attributes 'format_log' #1

Open
Itunumi opened this issue Feb 22, 2024 · 8 comments
Open

Semlog has no attributes 'format_log' #1

Itunumi opened this issue Feb 22, 2024 · 8 comments

Comments

@Itunumi
Copy link

Itunumi commented Feb 22, 2024

After inputting the code below:

import Semlog as SB

import pandas as pd
dataset = 'openstack_abnormal'
print('Hello')
SB.
parse = SB.format_log(
log_format=setting['log_format'],
indir= dataset)
form = parse.format(dataset+'.log')

I receive the error:

AttributeError Traceback (most recent call last)
in <cell line: 7>()
5 print('Hello')
6
----> 7 parse = SB.format_log(
8 log_format=setting['log_format'],
9 indir='../logs/'+dataset)

AttributeError: module 'Semlog' has no attribute 'format_log'

is there something I am missing?

@gaiusyu
Copy link
Owner

gaiusyu commented Feb 22, 2024

Thanks for your intrest in our work! I rechecked related code and found Semlog,py do have "format_log" in line 1049. You may check if you import corresponding packages correctly.
image

@Itunumi
Copy link
Author

Itunumi commented Mar 11, 2024

Thanks for your response.
Please, i am finding it difficult to install the Semlog package. it keeps saying module not found
Can you assist, please?

@Itunumi
Copy link
Author

Itunumi commented Mar 11, 2024

I have tried to pip install Semlog, but I guess it is not in the PyPi library. I also tried to install it directly from the git repository. See the error it brought below.
Please kindly assist on how to use the Semlog package. Thank you
Screenshot 2024-03-11 at 21 31 04
Screenshot 2024-03-11 at 21 31 45

@gaiusyu
Copy link
Owner

gaiusyu commented Mar 12, 2024

I haven't frequently used Jupyter Notebook, but I can offer you some suggestions:

  1. Check if your project structure is consistent with mine.
  2. You could copy Semlog.py to the same directory as semlog_benchmark.py, and then try import Semlog as SB instead.
  3. You could try using an absolute path to import Semlog.

@Itunumi
Copy link
Author

Itunumi commented Mar 12, 2024

thank you so much.
will try these

@sankexin
Copy link

you can try it like this:
python Semlog_benchmark.py

import sys
sys.path.append('..')

from Semlog import Semlog as SB

@Itunumi
Copy link
Author

Itunumi commented Mar 14, 2024

thank you so much for your help. I apprecaite

@sankexin
Copy link

sankexin commented Mar 14, 2024 via email

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

3 participants