You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the file "..."
create py file with below:
import transformer.transform as entry
with open("locustfile.py", "w") as f:
entry.dump(f, "[./examples/1.har]")
Run Transformer with the arguments "..."
python3.9 <>
See error
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):
OS: [e.g. Fedora, MacOS] MacOS
Version: [e.g. 22]
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
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 <thilp@thilp.net>
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: