Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Import error #26

Closed
firestonelib opened this issue Jun 27, 2018 · 5 comments
Closed

Import error #26

firestonelib opened this issue Jun 27, 2018 · 5 comments

Comments

@firestonelib
Copy link

firestonelib commented Jun 27, 2018

After pip install mxboard, when I import mxboard, it errors:

`import mxboard as mb
TypeError Traceback (most recent call last)
in ()
----> 1 import mxboard as mb

/home/users/nn/code/py/mxnet/python/mxboard/init.py in ()
19
20 from future import absolute_import
---> 21 from .writer import SummaryWriter
22
23 version = '0.1.0'

/home/users/nn/code/py/mxnet/python/mxboard/writer.py in ()
26 import os
27 import logging
---> 28 from .proto import event_pb2
29 from .proto import summary_pb2
30 from .event_file_writer import EventFileWriter

/home/users/nn/code/py/mxnet/python/mxboard/proto/event_pb2.py in ()
14
15
---> 16 from mxboard.proto import summary_pb2 as mxboard_dot_proto_dot_summary__pb2
17
18

/home/users/nn/code/py/mxnet/python/mxboard/proto/summary_pb2.py in ()
14
15
---> 16 from mxboard.proto import tensor_pb2 as mxboard_dot_proto_dot_tensor__pb2
17
18

/home/users/nn/code/py/mxnet/python/mxboard/proto/tensor_pb2.py in ()
14
15
---> 16 from mxboard.proto import resource_handle_pb2 as mxboard_dot_proto_dot_resource__handle__pb2
17 from mxboard.proto import tensor_shape_pb2 as mxboard_dot_proto_dot_tensor__shape__pb2
18 from mxboard.proto import types_pb2 as mxboard_dot_proto_dot_types__pb2

/home/users/nn/code/py/mxnet/python/mxboard/proto/resource_handle_pb2.py in ()
39 message_type=None, enum_type=None, containing_type=None,
40 is_extension=False, extension_scope=None,
---> 41 options=None, file=DESCRIPTOR),
42 _descriptor.FieldDescriptor(
43 name='container', full_name='tensorboard.ResourceHandleProto.container', index=1,

TypeError: new() got an unexpected keyword argument 'file'`

@firestonelib
Copy link
Author

firestonelib commented Jun 27, 2018

How could I solve that error? @reminisce @jpeddicord

@reminisce
Copy link
Contributor

Did you follow the installation instruction?

What are the versions of your TensorBoard, protobuf3, and Python?

@smartadpole
Copy link

smartadpole commented Jul 5, 2018

@reminisce I follow the installation correctly.
tensorboard-1.9.0 tensorflow-gpu-1.4.0 tensorflow-tensorboard-0.4.0
protobuf3-3.5.1
Python-3.5
error:

Traceback (most recent call last):
  File "/media/hao/DATA/STUDY/MobilenetV2/mxnet/mobilenetv2_mxnet/mxboard.py", line 5, in <module>
    from mxboard import SummaryWriter
  File "/media/hao/DATA/STUDY/MobilenetV2/mxnet/mobilenetv2_mxnet/mxboard.py", line 5, in <module>
    from mxboard import SummaryWriter
ImportError: cannot import name 'SummaryWriter'

@reminisce
Copy link
Contributor

Can you try

$ python
>>> import mxboard

If it returns error, it means your installation is not successful.

Also, not sure if it would cause name conflict if you have a file named mxboard.py since mxboard is the module's name. I suggest you name it to something else and try again.

@reminisce
Copy link
Contributor

This should fix the error you were facing. Closing the issue now and feel free to reopen if it's not resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants