Forum » Programiranje » Težava pri importanju extruct modula v PyCharm
Težava pri importanju extruct modula v PyCharm
HotBurek ::
Dober dan.
Ima težavo z importanjem in uporabo extruct modula, a le v PyCharm-u.
Koda:
Error:
AttributeError: module 'extruct' has no attribute 'extract'
V terminalu dela bp:
What to do next?
Ima težavo z importanjem in uporabo extruct modula, a le v PyCharm-u.
Koda:
#!/usr/bin/python3.7 import extruct; json = extruct.extract("lol"); print(json);
Error:
AttributeError: module 'extruct' has no attribute 'extract'
V terminalu dela bp:
root@debian:/# /usr/bin/python3.7 Python 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import extruct; RDFLib Version: 5.0.0 >>> json = extruct.extract("lol"); >>> print (json); {'microdata': [], 'json-ld': [], 'opengraph': [], 'microformat': [], 'rdfa': [], 'dublincore': [{'namespaces': {}, 'elements': [], 'terms': []}]} >>>
What to do next?
root@debian:/# iptraf-ng
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
infiniteLoop ::
Preveri če PyCharm uporablja enak python kot terminal (verzija, lokacija, virtualenv).
None of us is as dumb as all of us.
HotBurek ::
Interpreter je isti.
Sedaj sem ugotovil še to, da v interactive mode dela, če pa poženem:
/usr/bin/python3.7 /path/to/some.py
Pa ne dela.
Sedaj sem ugotovil še to, da v interactive mode dela, če pa poženem:
/usr/bin/python3.7 /path/to/some.py
Pa ne dela.
root@debian:/# iptraf-ng
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
HotBurek ::
Evo, rešil težavo.
Problem je bil v tem, da sem skripto, v kateri sem pisal program, poimenoval... well... extruct.py.
In posledično import taisto poimenovanega modula ni delal.
Problem je bil v tem, da sem skripto, v kateri sem pisal program, poimenoval... well... extruct.py.
In posledično import taisto poimenovanega modula ni delal.
root@debian:/# iptraf-ng
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | Zanka z zajemanjem števkOddelek: Programiranje | 1131 (816) | misticnimrk |
» | Postavitev mySQLOddelek: Programiranje | 2231 (1809) | M01O |
» | Pošljite nam vašo najboljšo kodoOddelek: Programiranje | 2177 (1422) | AndrejO |
» | Kako bi naredil programOddelek: Programiranje | 1756 (1024) | Spura |
» | Python - pomoč (strani: 1 2 3 )Oddelek: Programiranje | 18040 (8788) | black ice |