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

AttributeError: 'StdOutWithUpload' object has no attribute 'fileno' #222

Closed
neurocker opened this issue Feb 12, 2020 · 1 comment
Closed

Comments

@neurocker
Copy link

I ran the command:
python main.py train --pipeline_name unet_weighted

Error:

Traceback (most recent call last):
File "main.py", line 68, in
main()
File "C:\Anaconda3\envs\mapping\lib\site-packages\click\core.py", line 764, in call
return self.main(*args, **kwargs)
File "C:\Anaconda3\envs\mapping\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "C:\Anaconda3\envs\mapping\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Anaconda3\envs\mapping\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Anaconda3\envs\mapping\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)

File "main.py", line 29, in train
pipeline_manager.start_experiment()
File "D:\documents\python\projects\open-solution-mapping-challenge\src\pipeline_manager.py", line 29, in start_experiment
tags=self.config.tags)
File "C:\Anaconda3\envs\mapping\lib\site-packages\neptune_init_.py", line 102, in create_experiment
notebook_id=notebook_id
File "C:\Anaconda3\envs\mapping\lib\site-packages\neptune\projects.py", line 285, in create_experiment
click.echo(str(experiment.id))
File "C:\Anaconda3\envs\mapping\lib\site-packages\click\utils.py", line 218, in echo
file = _default_text_stdout()
File "C:\Anaconda3\envs\mapping\lib\site-packages\click_compat.py", line 675, in func
rv = wrapper_func()
File "C:\Anaconda3\envs\mapping\lib\site-packages\click_compat.py", line 436, in get_text_stdout
rv = _get_windows_console_stream(sys.stdout, encoding, errors)
File "C:\Anaconda3\envs\mapping\lib\site-packages\click_winconsole.py", line 295, in _get_windows_console_stream
func = _stream_factories.get(f.fileno())
AttributeError: 'StdOutWithUpload' object has no attribute 'fileno'

Previous steps and info

  • Commands python main.py prepare_masks and python main.py prepare_metadata --train_data --valid_data worked without errors.
  • I downloaded trained model and prediction on directory works fine.
  • I'm using small annotations file.
  • Windows 10 x64
  • Running in PyCharm terminal with administrator rights, mapping environment activated

Packages

altair 2.3.0
asn1crypto 0.24.0
attrdict 2.0.0
attrs 19.1.0
backcall 0.1.0
boto3 1.9.228
botocore 1.12.228
bravado 10.4.1
bravado-core 5.13.2
certifi 2019.6.16
cffi 1.12.3
chardet 3.0.4
Click 7.0
cloudpickle 1.2.1
colorama 0.4.1
cryptography 2.7
cycler 0.10.0
Cython 0.28.2
cytoolz 0.10.0
dask 2.3.0
decorator 4.4.0
docutils 0.15.2
entrypoints 0.3
future 0.17.1
gitdb2 2.0.5
GitPython 3.0.2
hunter 3.1.3
hyperopt 0.1.1
idna 2.8
imageio 2.5.0
imgaug 0.2.5
ipython 7.8.0
ipython-genutils 0.2.0
jedi 0.15.1
Jinja2 2.10.1
jmespath 0.9.4
joblib 0.13.2
jsonpointer 2.0
jsonref 0.2
jsonschema 3.0.2
kiwisolver 1.1.0
labelme 3.16.7
lightgbm 2.2.1
MarkupSafe 1.1.1
matplotlib 3.1.1
mkl-fft 1.0.14
mkl-random 1.0.2
mkl-service 2.3.0
monotonic 1.5
msgpack-python 0.5.6
munch 2.3.2
neptune-client 0.3.0
neptune-contrib 0.9.2
networkx 2.3
numpy 1.16.4
nvidia-ml-py3 7.352.0
oauthlib 3.1.0
olefile 0.46
opencv-python 3.4.0.12
pandas 0.24.2
parso 0.5.1
pickleshare 0.7.5
Pillow 5.4.1
pip 19.1.1
pretrainedmodels 0.7.0
prompt-toolkit 2.0.9
psutil 5.6.3
pycocotools 2.0
pycparser 2.19
pydensecrf 1.0rc2
pydot-ng 1.0.0
Pygments 2.4.2
PyJWT 1.7.1
pymongo 3.9.0
pyparsing 2.4.2
pyrsistent 0.15.4
python-dateutil 2.8.0
python-telegram-bot 11.1.0
pytz 2019.2
PyWavelets 1.0.3
PyYAML 5.1.2
QtPy 1.9.0
requests 2.22.0
requests-oauthlib 1.2.0
retrying 1.3.3
rfc3987 1.3.8
s3transfer 0.2.1
scikit-image 0.15.0
scikit-learn 0.21.2
scikit-optimize 0.5.2
scikit-plot 0.3.7
scipy 1.3.1
seaborn 0.9.0
setuptools 41.0.1
simplejson 3.16.0
six 1.12.0
smmap2 2.0.5
strict-rfc3339 0.7
swagger-spec-validator 2.4.3
termcolor 1.1.0
toolz 0.10.0
torch 1.0.1
torchvision 0.2.0
tornado 6.0.3
tqdm 4.23.0
traitlets 4.3.2
typing-extensions 3.7.4
urllib3 1.25.3
vega 2.6.0
wcwidth 0.1.7
webcolors 1.10
websocket-client 0.56.0
wheel 0.33.4
wincertstore 0.2
xgboost 0.90

Neptune connection established

изображение

@neurocker
Copy link
Author

neurocker commented Feb 25, 2020

Solution:
disable this attribute in C:\Anaconda3\envs\mapping\Lib\site-packages\click_winconsole.py, because there is no 'fileno':D

def _get_windows_console_stream(f, encoding, errors):
    if get_buffer is not None and encoding in ('utf-16-le', None) 
       and errors in ('strict', None) and hasattr(f, 'isatty') and f.isatty() 

       and hasattr(f, 'fileno'):  # here

        func = _stream_factories.get(f.fileno())
        if func is not None:
            ...

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

1 participant