質問編集履歴
3
インストールしているモジュールの一覧を追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -80,6 +80,44 @@
|
|
80
80
|
|
81
81
|
```
|
82
82
|
|
83
|
+
pip list
|
84
|
+
|
85
|
+
Package Version
|
86
|
+
|
87
|
+
-------------- --------
|
88
|
+
|
89
|
+
beautifulsoup4 4.7.1
|
90
|
+
|
91
|
+
bs4 0.0.1
|
92
|
+
|
93
|
+
certifi 2019.3.9
|
94
|
+
|
95
|
+
chardet 3.0.4
|
96
|
+
|
97
|
+
cssselect 1.0.3
|
98
|
+
|
99
|
+
html5lib 1.0.1
|
100
|
+
|
101
|
+
idna 2.8
|
102
|
+
|
103
|
+
lxml 4.3.3
|
104
|
+
|
105
|
+
pip 19.1.1
|
106
|
+
|
107
|
+
requests 2.22.0
|
108
|
+
|
109
|
+
setuptools 39.0.1
|
110
|
+
|
111
|
+
six 1.12.0
|
112
|
+
|
113
|
+
soupsieve 1.9.1
|
114
|
+
|
115
|
+
urllib3 1.25.3
|
116
|
+
|
117
|
+
webencodings 0.5.1
|
118
|
+
|
119
|
+
|
120
|
+
|
83
121
|
python -V
|
84
122
|
|
85
123
|
Python 3.7.1
|
2
ファイル名の変更・エラー内容の更新をしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
下記のソースコードにて実行した場合エラーが発生してしまいます。
|
8
8
|
|
9
|
-
ファイル名「
|
9
|
+
ファイル名「test.py」
|
10
10
|
|
11
11
|
```python
|
12
12
|
|
@@ -40,17 +40,37 @@
|
|
40
40
|
|
41
41
|
```
|
42
42
|
|
43
|
-
python
|
43
|
+
python test.py
|
44
44
|
|
45
|
-
.
|
46
45
|
|
47
|
-
.
|
48
46
|
|
49
|
-
|
47
|
+
Traceback (most recent call last):
|
50
48
|
|
51
|
-
|
49
|
+
File "test.py", line 2, in <module>
|
52
50
|
|
51
|
+
from bs4 import BeautifulSoup
|
52
|
+
|
53
|
+
File "/Users/name/.pyenv/versions/3.7.1/lib/python3.7/site-packages/bs4/__init__.py", line 34, in <module>
|
54
|
+
|
55
|
+
from .builder import builder_registry, ParserRejectedMarkup
|
56
|
+
|
57
|
+
File "/Users/name/.pyenv/versions/3.7.1/lib/python3.7/site-packages/bs4/builder/__init__.py", line 7, in <module>
|
58
|
+
|
53
|
-
t
|
59
|
+
from bs4.element import (
|
60
|
+
|
61
|
+
File "/Users/name/.pyenv/versions/3.7.1/lib/python3.7/site-packages/bs4/element.py", line 19, in <module>
|
62
|
+
|
63
|
+
from bs4.dammit import EntitySubstitution
|
64
|
+
|
65
|
+
File "/Users/name/.pyenv/versions/3.7.1/lib/python3.7/site-packages/bs4/dammit.py", line 13, in <module>
|
66
|
+
|
67
|
+
from html.entities import codepoint2name
|
68
|
+
|
69
|
+
File "/Users/name/Documents/selenium/html.py", line 2, in <module>
|
70
|
+
|
71
|
+
from bs4 import BeautifulSoup
|
72
|
+
|
73
|
+
ImportError: cannot import name 'BeautifulSoup' from 'bs4' (/Users/name/.pyenv/versions/3.7.1/lib/python3.7/site-packages/bs4/__init__.py)
|
54
74
|
|
55
75
|
```
|
56
76
|
|
1
実行ファイル名の追加をしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
下記のソースコードにて実行した場合エラーが発生してしまいます。
|
8
8
|
|
9
|
-
|
9
|
+
ファイル名「html.py」
|
10
10
|
|
11
11
|
```python
|
12
12
|
|