Coder Social home page Coder Social logo

Comments (13)

luoliyan avatar luoliyan commented on May 27, 2024 1

Okay, I'm just going to bundle everything.

from chinese-support-redux.

luoliyan avatar luoliyan commented on May 27, 2024 1

That will only work if you have the modules installed on your system. Bundling just means I'll package them up with the add-on so there's no outside dependency.

from chinese-support-redux.

luoliyan avatar luoliyan commented on May 27, 2024 1

Thanks for your help with this one. The updated __init__.py got lost in a different branch. I've tested on Windows. It should work now.

from chinese-support-redux.

luoliyan avatar luoliyan commented on May 27, 2024

Hmmm, are you sure? urllib3 is a dependency of requests which is bundled with Anki. Are you on Windows? Can you do this for me:

  1. Open Anki with addons disabled (hold down Shift while it's starting)
  2. Open the console (Ctrl+Shift+;)
  3. Paste this in the top box :
for top in sorted(set([m.split('.')[0] for m in modules])):
    print(top)
  1. Press Ctrl+Enter
  2. Post the list of modules here for me

from chinese-support-redux.

3ter avatar 3ter commented on May 27, 2024

Yes, I am on Windows. And I just read about the REPL in Anki on the addon dev page because I was curious 😄.

>>> for top in sorted(set([m.split('.')[0] for m in modules])):
...     print(top)
Traceback (most recent call last):
  File "aqt\main.py", line 1174, in onDebugRet
  File "<string>", line 1, in <module>
NameError: name 'modules' is not defined

from chinese-support-redux.

luoliyan avatar luoliyan commented on May 27, 2024

Sorry, I'm having a sloppy day. It needs to be:

from sys import modules
for top in sorted(set([m.split('.')[0] for m in modules])):
    print(top)

from chinese-support-redux.

3ter avatar 3ter commented on May 27, 2024

I can see only urllib no urllib3.

PyQt5
__future__
__main__
_ast
_bisect
_blake2
_bootlocale
_bz2
_codecs
_collections
_collections_abc
_compat_pickle
_compression
_ctypes
_datetime
_elementtree
_frozen_importlib
_frozen_importlib_external
_functools
_hashlib
_heapq
_imp
_io
_json
_locale
_lzma
_markupbase
_opcode
_operator
_pickle
_portaudio
_random
_sha3
_signal
_socket
_sqlite3
_sre
_ssl
_stat
_string
_struct
_thread
_warnings
_weakref
_weakrefset
_winapi
abc
anki
aqt
argparse
ast
atexit
audioop
base64
binascii
bisect
bs4
builtins
bz2
calendar
cgi
chunk
codecs
collections
contextlib
copy
copyreg
ctypes
datetime
decorator
difflib
dis
distutils
email
encodings
enum
errno
faulthandler
fnmatch
functools
gc
genericpath
getpass
gettext
gzip
hashlib
heapq
hmac
html
http
imp
importlib
inspect
io
ipaddress
itertools
json
keyword
linecache
locale
logging
lzma
markdown
marshal
math
mimetypes
msvcrt
netrc
nt
ntpath
nturl2path
opcode
operator
optparse
os
pickle
platform
posixpath
pprint
pyaudio
pyexpat
pyimod01_os_path
pyimod02_archive
pyimod03_importers
pythoncom
pywintypes
queue
quopri
random
re
reprlib
requests
select
selectors
send2trash
shlex
shutil
signal
sip
socket
socketserver
sqlite3
sre_compile
sre_constants
sre_parse
ssl
stat
string
stringprep
struct
subprocess
sys
tempfile
textwrap
threading
time
token
tokenize
traceback
types
unicodedata
urllib
uu
uuid
warnings
wave
weakref
win32api
win32com
win32file
win32pipe
winerror
winreg
xml
zipfile
zipimport
zlib

from chinese-support-redux.

3ter avatar 3ter commented on May 27, 2024

Okay, I'm just going to bundle everything.

Is bundling as easy as changing the import statements as described here on reddit?

from chinese-support-redux.

luoliyan avatar luoliyan commented on May 27, 2024

Are you able to give the update a try? Download https://ufile.io/b89ef, make a new folder in your addons21folder and drop all the files in there

from chinese-support-redux.

3ter avatar 3ter commented on May 27, 2024

I'm getting the same error.
image

image

from chinese-support-redux.

3ter avatar 3ter commented on May 27, 2024

@luoliyan Shouldn't there be a file called urllib3.py in the folder? I couldn't find one. In the six module folder we have a file six.py as well and this can be imported.
image

from chinese-support-redux.

luoliyan avatar luoliyan commented on May 27, 2024

from chinese-support-redux.

3ter avatar 3ter commented on May 27, 2024

Just wanted to leave another "Thank you!" here 😄.

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.