Coder Social home page Coder Social logo

Comments (4)

rjpeterson avatar rjpeterson commented on June 6, 2024

Here is an example of the error:

runfile('D:/My Documents/Code/Python/chinese-support-redux/chinese/transcribe.py', wdir='D:/My Documents/Code/Python/chinese-support-redux/chinese')
Traceback (most recent call last):
File "D:\My Documents\Code\Python\venv\lib\site-packages\IPython\core\interactiveshell.py", line 3267, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
runfile('D:/My Documents/Code/Python/chinese-support-redux/chinese/transcribe.py', wdir='D:/My Documents/Code/Python/chinese-support-redux/chinese')
File "D:\Program Files\JetBrains\PyCharm Community Edition 2018.3.1\helpers\pydev_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "D:\Program Files\JetBrains\PyCharm Community Edition 2018.3.1\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:/My Documents/Code/Python/chinese-support-redux/chinese/transcribe.py", line 22, in
from .bopomofo import bopomofo
File "D:\Program Files\JetBrains\PyCharm Community Edition 2018.3.1\helpers\pydev_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'main.bopomofo'; 'main' is not a package

from chinese-support-redux.

rjpeterson avatar rjpeterson commented on June 6, 2024

Maybe a better question is:
What are the best ways to go about testing changes to the code for add-ons like this?

I know there has to be a way to test say... the functions inside of the color.py file without having to actually start the Anki GUI. I've tried many things (running the file in pycharm console, running python from a terminal, manually adding the anki and aqt packages to the add-on's library) but I eventually ran across a "missing win32file module" error and gave up.

from chinese-support-redux.

jdlorimer avatar jdlorimer commented on June 6, 2024

from chinese-support-redux.

jdlorimer avatar jdlorimer commented on June 6, 2024

I've added some basic instructions to the readme. I don't really have experience with PyCharm, so I can't tell you how to test it through that IDE. When I program on Windows, I generally set up a basic Unix environment (with MSYS2 or something similar) and run everything from the command line.

Let me know if you have any other questions.

from chinese-support-redux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.