-
Notifications
You must be signed in to change notification settings - Fork 14
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
Could not convert HAR using library #75
Labels
bug
Something isn't working
Comments
Even I'm facing the same issue, can anyone let us know how to fix this issue? |
thilp
added a commit
that referenced
this issue
Oct 20, 2021
Top-level functions accept LaxPath instances, which are unions of Path and str. However, Scenario.from_path expects only a Path (not a str) and is called by _dump_as_lines (which uses LaxPath) without first converting potential strings to Path. Reported in #75. Signed-off-by: Thibaut Le Page <[email protected]>
This was referenced Oct 20, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I have placed HAR in examples folder of transformer folder.
Created py file with below:
`import transformer.transform as entry
with open("locustfile.py", "w") as f:
entry.dump(f, "[./examples/1.har]")`
and ran transformer library, below is the exception:
➜ transformer git:(master) ✗ python3.9 NaveenTest.py
Traceback (most recent call last):
File "/Users/nmandepudi/transformer/NaveenTest.py", line 4, in
transformer.dump(f, ["./examples/1.har"])
File "/Users/nmandepudi/transformer/transformer/transform.py", line 91, in dump
file.writelines(
File "/Users/nmandepudi/transformer/transformer/transform.py", line 135, in intersperse
yield next(it)
File "/Users/nmandepudi/transformer/transformer/transform.py", line 106, in _dump_as_lines
scenarios = [
File "/Users/nmandepudi/transformer/transformer/transform.py", line 107, in
Scenario.from_path(
File "/Users/nmandepudi/transformer/transformer/scenario.py", line 155, in from_path
if path.is_dir():
AttributeError: 'str' object has no attribute 'is_dir'
Transformer version
Output of the command
transformer --version
.1.3.0
To Reproduce
Steps and input files to reproduce the behavior:
create py file with below:
import transformer.transform as entry
with open("locustfile.py", "w") as f:
entry.dump(f, "[./examples/1.har]")
python3.9 <>
Expected behavior
A clear and concise description of what you expected to happen.
HAR should be converted py file.
Screenshots
output on running the above py file:
➜ transformer git:(master) ✗ python3.9 NaveenTest.py
Traceback (most recent call last):
File "/Users/nmandepudi/transformer/NaveenTest.py", line 4, in
transformer.dump(f, ["./examples/1.har"])
File "/Users/nmandepudi/transformer/transformer/transform.py", line 91, in dump
file.writelines(
File "/Users/nmandepudi/transformer/transformer/transform.py", line 135, in intersperse
yield next(it)
File "/Users/nmandepudi/transformer/transformer/transform.py", line 106, in _dump_as_lines
scenarios = [
File "/Users/nmandepudi/transformer/transformer/transform.py", line 107, in
Scenario.from_path(
File "/Users/nmandepudi/transformer/transformer/scenario.py", line 155, in from_path
if path.is_dir():
AttributeError: 'str' object has no attribute 'is_dir'
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: