ReBench icon indicating copy to clipboard operation
ReBench copied to clipboard

Error in Environment.py: 'str' object has no attribute 'decode'

Open daumayr opened this issue 5 years ago • 2 comments

After installing rebench on Fedora 32 with pip install rebench i had the following error:

fatal: No remote configured to list refs from.
Traceback (most recent call last):
  File "/usr/local/bin/rebench", line 5, in <module>
    from rebench.rebench import main_func
  File "/usr/local/lib64/python3.8/site-packages/rebench/rebench.py", line 37, in <module>
    from .persistence    import DataStore
  File "/usr/local/lib64/python3.8/site-packages/rebench/persistence.py", line 141, in <module>
    _source = determine_source_details()
  File "/usr/local/lib64/python3.8/site-packages/rebench/environment.py", line 43, in determine_source_details
    result['repoURL'] = _encode_str(parsed.geturl())
  File "/usr/local/lib64/python3.8/site-packages/rebench/environment.py", line 17, in _encode_str
    as_string = out.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'

The rebench version is 1.0.1 I was able to run rebench successfully after removing the .decode('utf-8') in environment.py

daumayr avatar Sep 15 '20 16:09 daumayr

Hm, thinking about it, I think these issues may already be fixed on master. I'll prepare a new release. It is also going to contain the support to reduce the noise from the system.

smarr avatar Sep 16 '20 09:09 smarr

I confirm it works on master (https://github.com/smarr/ReBench/commit/0ec399a8c23a84022aa0271eb1caf30bdea8b2f6).

cajomferro avatar Sep 30 '20 13:09 cajomferro

With #208 being merged, there's only one Python version, so, I hope such issues are a thing of the past and hope this is resolved.

smarr avatar Jul 04 '23 15:07 smarr