when i'm just importing pandas on Python 3.6.9 this error happens but when importing pandas on python 2.7 it just work fine.
import pandas as pd
this is the console output
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/amir/.local/lib/python3.6/site-packages/pandas/__init__.py", line 177, in <module>
import pandas.testing
File "/home/amir/.local/lib/python3.6/site-packages/pandas/testing.py", line 5, in <module>
from pandas._testing import (
File "pandas/src/testing.pyx", line 4, in init pandas._testing (pandas/src/testing.c:4441)
File "/home/amir/.local/lib/python3.6/site-packages/pandas/types/missing.py", line 5, in <module>
from pandas import lib
File "pandas/lib.pyx", line 1, in init pandas.lib (pandas/lib.c:90894)
File "pandas/tslib.pyx", line 68, in init pandas.tslib (pandas/tslib.c:116506)
ImportError: cannot import name parse_date
can you suggest what to do beside using python 2.7?
Related
I try to import moviepy in Pycharm as below:
from moviepy.editor import *
But I got the below errors:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "D:\Workspace\Property\Property\venv\lib\site-packages\moviepy\editor.py", line 36, in <module>
from .video.io.VideoFileClip import VideoFileClip
File "D:\Workspace\Property\Property\venv\lib\site-packages\moviepy\video\io\VideoFileClip.py", line 3, in <module>
from moviepy.audio.io.AudioFileClip import AudioFileClip
File "D:\Workspace\Property\Property\venv\lib\site-packages\moviepy\audio\io\AudioFileClip.py", line 3, in <module>
from moviepy.audio.AudioClip import AudioClip
File "D:\Workspace\Property\Property\venv\lib\site-packages\moviepy\audio\AudioClip.py", line 7, in <module>
from moviepy.audio.io.ffmpeg_audiowriter import ffmpeg_audiowrite
File "D:\Workspace\Property\Property\venv\lib\site-packages\moviepy\audio\io\ffmpeg_audiowriter.py", line 8, in <module>
from moviepy.decorators import requires_duration
File "D:\Workspace\Property\Property\venv\lib\site-packages\moviepy\decorators.py", line 10, in <module>
#decorator.decorator
AttributeError: module 'decorator' has no attribute 'decorator'
I am using Python 3.9.6 on Windows 10, PyCharm as IDE, and moviepy's version is 1.0.3.
I am currently following a book(Trading Evolved) for learning the algorithmic trading but got **stuck on ingesting quandal what should I do now. I have tried to find the answer but can not get any solution for the same. PLEASE HELP
'''(zip35) C:\Users\jayan>zipline ingest -b quandl
Traceback (most recent call last):
File "C:\Users\jayan\anaconda3\envs\zip35\Scripts\zipline-script.py", line 33, in <module>
sys.exit(load_entry_point('zipline==1.4.1', 'console_scripts', 'zipline')())
File "C:\Users\jayan\anaconda3\envs\zip35\Scripts\zipline-script.py", line 25, in
importlib_load_entry_point
return next(matches).load()
File "C:\Users\jayan\anaconda3\envs\zip35\lib\site-packages\importlib_metadata\__init__.py", line
100, in load
module = import_module(match.group('module'))
File "C:\Users\jayan\anaconda3\envs\zip35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\jayan\anaconda3\envs\zip35\lib\site-packages\zipline\__init__.py", line 29, in
<module>
from .utils.run_algo import run_algorithm
File "C:\Users\jayan\anaconda3\envs\zip35\lib\site-packages\zipline\utils\run_algo.py", line 20, in
<module>
from zipline.data import bundles
File "C:\Users\jayan\anaconda3\envs\zip35\lib\site-packages\zipline\data\bundles\__init__.py", line
2, in <module>
from . import quandl # noqa
File "C:\Users\jayan\anaconda3\envs\zip35\lib\site-packages\zipline\data\bundles\quandl.py", line
16, in <module>
from . import core as bundles
File "C:\Users\jayan\anaconda3\envs\zip35\lib\site-packages\zipline\data\bundles\core.py", line 15,
in <module>
from ..minute_bars import (
File "C:\Users\jayan\anaconda3\envs\zip35\lib\site-packages\zipline\data\minute_bars.py", line 30, in
<module>
import tables
File "C:\Users\jayan\anaconda3\envs\zip35\lib\site-packages\tables\__init__.py", line 99, in <module>
from .utilsextension import (
ImportError: DLL load failed: The specified module could not be found.'''
Thank you to whoever replies to this.
Typically when there is a missing DLL in a Python package it's due to the absence of the C++ redistributable:
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
Hello I've similar problem like this:
Py2Exe error caused by pywinauto on some systems: "AttributeError: 'module' object has no attribute 'CUIAutomation"
with py2exe and also pyinstaller I get error:
AttributeError: module 'comtypes.gen.UIAutomationClient' has no attribute 'CUIAutomation' [15964] Failed to execute script SVGWalker
Without py2exe or pyinstaller the script is running without errors !!
Here my startup python code:
#################################################################
# Version String
#################################################################
__version__ = "1.4.1.0"
#import WindowHandler
#import win32com.client
#import pywinauto
from pywinauto import application
from pywinauto import timings
from pywinauto import ElementNotFoundError
from pywinauto import Desktop
#import comtypes.client # 02.10.2020
import glob
import time
import sys
import os
import argparse
import traceback
import helper
import XmlManifest
and the error: with line 13 above:
Traceback (most recent call last):
File "SVGWalker.py", line 13, in <module>
from pywinauto import application
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
exec(bytecode, module.__dict__)
File "pywinauto\__init__.py", line 89, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
exec(bytecode, module.__dict__)
File "pywinauto\findwindows.py", line 42, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
exec(bytecode, module.__dict__)
File "pywinauto\controls\__init__.py", line 36, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
exec(bytecode, module.__dict__)
File "pywinauto\controls\uiawrapper.py", line 47, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
exec(bytecode, module.__dict__)
File "pywinauto\uia_defines.py", line 181, in <module>
File "pywinauto\uia_defines.py", line 169, in _build_pattern_ids_dic
File "pywinauto\uia_defines.py", line 50, in __call__
File "pywinauto\uia_defines.py", line 63, in __init__
AttributeError: module 'comtypes.gen.UIAutomationClient' has no attribute 'CUIAutomation'
[5732] Failed to execute script SVGWalker
Nothing in the thread above helped me.
Is there any other hint or solution
i have a python3 project with a subdirectory GTFSr with a file gtfsr that have a class GTFSR
---main.py <--there is a class UTILITY
|----GTFSr
|----gtfsrdb.py <--here i have GTFSrDB class that extend UTILITY.
when in main i type:
from GTFSr.gtfsrdb import GTFSrDB
I have this error:
`ImportError: cannot import name 'GTFSrDB' from 'GTFSr.gtfsrdb' (.....\GTFSr\gtfsrdb.py)`
UPDATE traceback:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "xxx\GTFSr\gtfsrdb.py", line 33, in <module>
from ReadProtocolBufferFiles import Utils
File "xxx\ReadProtocolBufferFiles.py", line 9, in <module>
from GTFSr.gtfsrdb import GTFSrDB
ImportError: cannot import name 'GTFSrDB' from 'GTFSr.gtfsrdb' (C:\xxxxxx\GTFSr\gtfsrdb.py)
Some Tips?
thanks
Regards
I think you need an __init__.py inside "GTFSr". Create an empty GTFSr/__init__.py and try your code please. Thanks.
I'm trying to classify my own images in tensorflow.
I have entered the following command to train my model:
python3 train.py --logstderr --train_dir=training/ --
pipeline_config_path=training/ssd_mobilenet_v1_pets.config
From tutorial https://youtu.be/JR8CmWyh2E8?t=757 time 12:38
and I get the following error:
Traceback (most recent call last):
File "train.py", line 51, in <module>
from object_detection.builders import model_builder
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/usr/local/lib/python3.5/dist-packages/object_detection-0.1-py3.5.egg/object_detection/builders/model_builder.py", line 17, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/usr/local/lib/python3.5/dist-packages/object_detection-0.1-py3.5.egg/object_detection/builders/anchor_generator_builder.py", line 20, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/usr/local/lib/python3.5/dist-packages/object_detection-0.1-py3.5.egg/object_detection/protos/anchor_generator_pb2.py", line 27, in <module>
File "/usr/local/lib/python3.5/dist-packages/google/protobuf/descriptor.py", line 829, in _new_
return _message.default_pool.AddSerializedFile(serialized_pb)
TypeError: Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file "object_detection/protos/anchor_generator.proto":
object_detection/protos/anchor_generator.proto: Import "object_detection/protos/grid_anchor_generator.proto" has not been loaded.
object_detection/protos/anchor_generator.proto: Import "object_detection/protos/ssd_anchor_generator.proto" has not been loaded.
object_detection.protos.AnchorGenerator.grid_anchor_generator: "object_detection.protos.GridAnchorGenerator" seems to be defined in "protos/grid_anchor_generator.proto", which is not imported by "object_detection/protos/anchor_generator.proto". To use it here, please add the necessary import.
object_detection.protos.AnchorGenerator.ssd_anchor_generator: "object_detection.protos.SsdAnchorGenerator" seems to be defined in "protos/ssd_anchor_generator.proto", which is not imported by "object_detection/protos/anchor_generator.proto". To use it here, please add the necessary import.
What have I done wrong? Thanks in advance.
Update:
I now get this error:
Traceback (most recent call last):
File "train.py", line 51, in <module>
from object_detection.builders import model_builder
File "/usr/local/lib/python3.5/dist-packages/object_detection-0.1-py3.5.egg/object_detection/builders/model_builder.py", line 17, in <module>
File "/usr/local/lib/python3.5/dist-packages/object_detection-0.1-py3.5.egg/object_detection/builders/anchor_generator_builder.py", line 20, in <module>
ImportError: cannot import name 'anchor_generator_pb2'