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

What platform is this code tested on? #11

Open
wzm2256 opened this issue Jul 6, 2021 · 1 comment
Open

What platform is this code tested on? #11

wzm2256 opened this issue Jul 6, 2021 · 1 comment

Comments

@wzm2256
Copy link

wzm2256 commented Jul 6, 2021

Describe the bug
I run into several bugs regarding the path variable.

The first attempt:

E:\Program\Anaconda3\envs\Py35\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Traceback (most recent call last):
  File "aggregator.py", line 142, in <module>
    subpaths = [path / dname / subpath for subpath in args.subpaths for dname in os.listdir(path) if dname != FOLDER_NAME]
  File "aggregator.py", line 142, in <listcomp>
    subpaths = [path / dname / subpath for subpath in args.subpaths for dname in os.listdir(path) if dname != FOLDER_NAME]
TypeError: listdir: illegal type for path parameter

This is because the 'os.listdir' in line 141 complains the Path object should not be used with the os lib, instead, it should be used with its class method Path.iterdir().

Anyway, I give it a second try after fixing this.
Again, another bug

Traceback (most recent call last):
  File "aggregator.py", line 146, in <module>
    if not os.path.exists(subpath):
  File "E:\Program\Anaconda3\envs\Py35\lib\genericpath.py", line 19, in exists
    os.stat(path)
TypeError: argument should be string, bytes or integer, not WindowsPath

The problem is still related to the wrongly use of Path object with os library.

To Reproduce
Steps to reproduce the behavior.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10.0
  • python version 3.5
  • tensorflow version
  • numpy version

Additional context
Add any other context about the problem here.

@Spenhouet
Copy link
Owner

This tool was tested on Windows 10 and python 3.7. That is something I could have documented in the readme.
I also just noticed that I did not pin the dependency versions in the requirements.txt file.

I see the problem with the combination of the os and pathlib libraries. Would you like to open a pull request to improve on this?

@Spenhouet Spenhouet changed the title Hi, what platform is this code tested on? What platform is this code tested on? Aug 24, 2023
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

2 participants